Stepper motors changing direction during homing function?

You don't convince me... Interrupt is not a GOTO, making the execution start all over somewhere. Drop the interrupts. Check the tilt sensor after every stepping pulse.