Delete the parts of the metadata here that don't apply after the edit.  In particular, be sure that the preview image does not get written back into the edited image.  We could add a new preview image, but that might be too much trouble right now.