Move ENDSTOP_Z_MIN setting to before the 'if (retainCounters) return' st...

...atement