[Fixes #80417690]
We place DG.dirtyCurrentDocument strategically to mark the document dirty when the map changes.