Merge "Move window replacement tracking to window state."