Fix 'is dialog open' test bug