This Model X door wouldn't latch all the way closed.
I was able to compare how the latch on the door looked compared to how it looked on the functioning door.
So the door that wouldn't latch couldn't latch closed because the latch was already locked in place. The solution was actually pretty simple. I used a flat head screwdriver to gently push the latch open. Took about 10 seconds and not much force at all. It snapped open. Then the door could latch and close again.