I wonder if he would still take a loss if you didn't train him at all. Save the XP and spend it after you make the switch.
I was hoping someone tested all this out and people had a good idea how it works by now. I can't find anything though, except for random horror stories like the ones you just posted.