Interestingly, I cannot reproduce it. Does the crash happen immediately, or does it take minutes or hours before it happens?
I have added some code that should reduce the odds, and made the 0.1.26 release, but... the code should really make it impossible already. At the beginning of each tick I note the speed of the train, and when adjusting the train-speed I already check whether it is in the same direction as the original direction. I added some margin, for very slow moving trains, to just 'leave it alone' ^_^
If you have a save-game that shows the crash, I'd be grateful if you could share it.
Also, I made the electric trains more realistic as well - they still accelerate faster than the default locomotives, but not by as much.