Merge "Ensure new dialogs do not cause orphaned windows"