Fixed support for 1d image regridding.

The functionality being tested used to work before a change (some 6 months ago) to better support masked image transformations. This restores the functionality and adds a suitable test.