6597d3f35196 introduced lossless JPEG transformations including a
reset of the Exif orientation tag before saving a JPEG image.
This leads to wrongly transformed images (modified or unmodified)
if the original JPEG already had an orientation tag with a visible
transformation (not None or Normal).
This is fixed by not resetting the orientation before saving, which
keeps the original JPEG data including orientation. Only before
executing a lossless transformation the Exif orientation correction
is applied and the tag is reset.
FIXED-IN: 18.08.2