dialog history: Don't close dialogs that were already open when history was enabled