Merge "Dismiss a dialog if dimissed right after calling show(). Bug #2508607"