Merge "Fix bug where JPEG file with XMP is incorrectly saved"