Photos with inverted rotation are displayed incorrectly in Gallery

REPRODUCIBILITY (% or how often): 100%
BUILD ID = OS VERSION (Settings > About product): 4.1.0.23
HARDWARE (XA2, X10, X10 II, …): Xperia 10 II
REGRESSION: (compared to previous public release: Yes, No, ?): ?

DESCRIPTION:

When you take a picture with the device rotated 90 degrees clockwise, the picture will display as a square in the Gallery app (as well as in the Camera roll), with the sides cut off. If you then swipe to the previous or next picture, the sides of the picture with inverted rotation will be displayed. This happens regardless of picture resolution or front/back camera and also happens for pictures taken or created on other non-Sailfish devices. Additionally, due to the cut off edges, it’s hard to zoom in and out properly.

STEPS TO REPRODUCE:

1a) Take picture with device rotated 90 degrees clockwise or
1b) Move any picture with 90 degrees clockwise rotation to folder indexed by Gallery on Sailfish device
2) Open picture in Camera roll or Gallery app

EXPECTED RESULT:

Full picture is displayed.

ACTUAL RESULT:

Picture is cut off.

ADDITIONAL INFORMATION:

I’ve uploaded a picture with inverted rotation over here:
https://www79.zippyshare.com/v/9yDvadFW/file.html