Fix unnecessary dirty state from popup

Fixes RM-2636