Apparently a few restarts later it fixed itself. It's a bit tedious waiting for the coupling, but it's better than risking more bugs saving just after the coupling happens but before going to the front of the train as directed (and I tried that one time, but the bug appears to kick in before then, as it persists on reloading)