fix for RGB crash in GDAL layer