Hi,
the only other possible culprit then is:
G92 Z0
You may have noted that the short Gcode reference in Mach3 does not recommend this legacy G code. I don't recall having used it or had
any Gcode generated by a CAM/post that used it either.
I'm wondering if it updates the work co-ordinates ie your current G54 or whether it changes your machine co-ordinates?
I think some experimentation on the effects of this code are in order.
Craig