R2R: Fix bug #6547 - Invalid cursor during dialogs