Bugfix: Earlier, when closing the window, clicking 'cancel' when prompted to save a tab would cause an infinite loop