CRM-14353 - Cleanup old dialog when opening a new one