This was an unrelated bug I noticed. If there was an image with exif orientation data and a corrupt exif preview, then we would not have displayed the image with the correct orientation. Very unlikely to manifest, but I fixed it.