Fixed the image compare functionality.

Fixed a bug recently introduced by me in #2713.