You need to scale the stl by 25.4x when you bring it into MeshCAM, and make sure the units are all in mm's when working in MeshCAM.
You may need to reset the default settings in MeshCAM to mm's.

But you really shouldn't need to do this. If Mach3 is set up in mm's, loading G -code with a G20 should run correctly, as Mach3 will scale the code.

I still think it's a Mach3 setup issue, and nothing is wrong with the g-code.