[GEOT-4944]: Fixing ImageLayout for netcdf reader - backport to 12.x