fdo#84658 on reexec, cancel modification before resetting IsModification state

Change-Id: I878bff4d36ca1c2dd9474c937b03d0b366a6e911
Reviewed-on: https://gerrit.libreoffice.org/11824
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>