Fixes image unit tests introduced in d715483 to actually test the bug.
Implements image view fix that didn't make it into d662191 for some reason.