Currently, although train_ensure_init sets the train.wait_for_path
correctly, no other place in the code handles this state. This results
in a crash when anything is done on the train, because train_ensure_init
is currently expected to never fail. A condition to abort when the train
is not ready is required in all places that use this function.