Fixes NB#114384, try to close active dialogs whenever we want to show a new window...