Some steps towards resolving the focus bug.

Sometimes when a window is unmapped, no window gets the focus border
correctly. Parts of the bug's reason were tracked down, but it still
occurs.