Reproduction steps:
1) Purchase SR 2-NOL EMU
2) Upgrade the front vehicle to BR415 / 6
3) Attempt to upgrade the second vehicle to BR Class415 "4-EPB" EMU (rear) or BR Class416 "2-EPB" EMU (rear)
In both cases, it will be upgraded to a different vehicle than you chose.
(https://i.imgur.com/IV5pvXG.gif)
Unfortunately, there are now two vehicles facing forward...
(´・ω・`)お金返して?
I think I have fixed this bug. Please check the pull request #499.
This was a very annoying bug because upgrades cannot be redone.
The bug is somehow caused by the simtool sending an order to the depot to upgrade to a vehicle that is not selected, but I could not figure out why. However, a check to make sure it's not wrong will stop it from trying to upgrade to the wrong vehicle.
Excellent, thank you: now incorporated.