Bugfix: windows no longer become topmost accidentally.

This bug was introduced when guaranteeing the same z order of windows
when switching between desktops. Sometimes a window was moved above a
topmost window. This has the side effect of making that window topmost
as well.