ticket.56763: Fix crash when dismissCurrentDialog() called twice.