Works around the 'compare: image size differs' error by swapping image order if detected