Just an update on this, Wojtek got back to me regarding the M124 macro, it seems Mach has issues with coordinates synchronization during G31. in versions after 044 and hence the epid error. Why it only affects it when run from G Code I have no idea but I installed 044 today and removed the write to Z dro line I had put in to get it working and it was fine.
It may have also cleared up an issue I had that if the computer was sitting idle for a long time it would kind of half lock up, for example I could jog etc but MDI would not do anything. Strange thing is I have 062 (which is what I was using) on all my other machines, one of which uses the IP/A, and I have no such issues. Will have to wait a while though to be sure it has cleared up that issue.
Regarding the original M31 problem which lead to me to find this one, they are still looking into it and will let me know if they find the problem.