Interesting development. Even though the X axis limit switch tested fine with a meter, I decided to change it anyway. Voila, homing works just fine now.