but I hardly had any choice
I'll just reiterate every other person who's responded.
If you learn anything from this experience, it should include that "but I hardly had any choice" is a mistaken belief.
Everyone else above me already explained the situation perfectly.
I'll just add that any impatient drivers who were behind you won't be paying for your ticket, so in case you felt like there was some pressure on you to move forward, let me underscore that you did not need to somehow accommodate them by doing something unsafe. And more crucially, they wouldn't have been taking the hit on the train tracks either, if, God forbid, a train had suddenly appeared.