Fix undo of image colorspace conversion
The color space of the image projection should be change before
other layers are converted. Some layers, which are updated using
resetCache() fetch this information from the image, therefore it
should be prepared beforehand.