Fix error message for out of bounds image access.
(#380)