When homing Mach will ignore the Limit switch until homing has completed. What I suspect may be happening is you have a slight bounce on the switch, the axis starts homing, opens the switch but as the axis starts to reverse the switch closes slightly then opens again. Mach has seen it close so says its home then sees it open again so thinks the limit has been triggered. The way to see if that is the case is look at the machine coords for that axis when you have homed, if its zero then that is whats happened, if its not then there is something else wrong.
Hood