Is there a reason you have #define Z_SAFE_HOMING disabled? It shouldn't matter, but it is causing things to go down drastically different code paths than what is happening on my system. Can this be enabled for the debugging process?