Firefox 67.0.2 shows corrupt intermediate images when loading large progressive JPEGs

The above progressive JPEG has a horizontal resolution of 10000 pixels.

While the image is loading, Firefox 67 displays the intermediate progressive scans incorrectly and fails to display the image correctly even when fully loaded. After a page refresh, when the image is loaded from cache and the intermediate scans are not displayed, the image shows correctly.

This happens with an image size (in either dimension) above 8192px.

Submitted as Mozilla Bug 1559688

Screencap during page load

Firefox 67.0.2 Windows: hard reload (shift+reload) showing corrupted image, followed by soft reload (image from cache) showing it correctly.