Backported from trunk (rev #9963):
double check if the dialog can be found after created