Fix for handling RasterLayer and pixel_data input.