GlobalActions: Fix possible race condition when showing dialog.