Check how many windows are open before prompting the user about closing windows that might not be open.
#3256
merged
mentioned in commit f4c05311