Fixes case where docked MDI widgets were not able to block a close (cherry-picked from commit 61cca1e5ec)
61cca1e5ec