Fixes ohiggins' #81616 (disable exporting to shp for raster layers) and minen's #81440