Hmm. I can tinker with the internals of image.rotate[] to try to make it better behaved. When you need exact 90 degree rotation increments, image.transform[] is more efficient, and will always be precise. Here's a routine you could use as a workaround for now:
on rotated img steps do # modify 'img' in-place based on 45 degree steps: if steps~0 # do nothing elseif steps~2 img.transform["right"] elseif steps~4 img.transform["right"].transform["right"] elseif steps~6 img.transform["left"] else img.rotate[steps*pi/4] end img end