Servo problems with VarSpeedServo.h

The only thing that looks odd to me is the way you keep attaching and detaching the servos. It may not be the problem but detaching does leave the servo with no control signal so it can potentially float about and then attaching again causes the library send an initialise signal which I think is done at full speed. In my (non-railway) use of servos I've always just attached them all in setup() and left them.

But I'm a little confused. Are you saying that the code you posted now works?

Steve