Simplify dialog detection on window closing in the overview, fix infinite loop
Instead of using the window-added
handler twice in the workspace view, just let the window clone activate itself if a dialog was added after the user tried to close the window.
Also fix an infinite loop that appears when a third (or more) modal dialog is added while the overview is open.