I have a rack-based toolchanger/toolsetter at the back of my CNC router. My custom M6 gcode saves the X,Y location at the start, and moves back there at the end (at max Z, of course). Often the next thing that happens is a rapid to a different X,Y. I'm wondering if there's a safe way to not restore the position after the M6, or if there's some magic to restore it only if the next move is anything other than a G0XnYn move (i.e. G1 or G0Zn)?