Mister Beasley, as much as I would like to dismiss your hypothesis, it could be a plausible explanation.
I plead guilty to the issue of small pieces of metal on my layout, since I have a bad habit of clipping rails without catching the clipped pieces as I fit track along the right of way. From time to time, I do spot these small pieces of metal and remove them from the layout.
Rich
Alton Junction
I'm going to propose a different hypothesis, with no basis other than "it fits the description."
There was a piece of metal on the track, which caused the derailment and then got stuck in the wheels, shorting the engine out. When you removed the shell, the scrap fell out, clearing the short and allowing the engine to work again. A loose wire in the truck connection would have the same effect, but wouldn't have caused the derailment.
It takes an iron man to play with a toy iron horse.
I experienced a very odd situation on my layout yesterday.
I decided to run a Proto 2000 G9 which had not been run in awhile. So, I powered it up and ran it out of my diesel servicing facility onto the main line track. As it moved through a double slip, one wheelset derailed and the resulting short shut down my DCC booster, an NCE PH-Pro 5 amp system.
The loco did not fall over or anything else very dramatic. Just one wheelset derailed. Once I put the loco back on the rails, it was sparking, making electrical buzzing sounds, and continually shorting out the system.
Alarmed, I pulled the loco off the main line track and decided to test the decoder on my programming track. Nothing. Cannot read CV. Incidentally, the decoder was an NCE P2K-SR.
I have fried a few decoders in my time, once or twice due to my own installation errors, once due to a manufacturing flaw on a Life Like S3. But, I simply could not believe that I fried this one.
I took the shell off of the chassis to look at the decoder. Everything seemed OK. I replaced the decoder with the original DC circuit board and ran it on a DC test track. It ran fine.
So, then I tested the decoder with my NCE DTK and, to my surprise, everything tested out OK. So, I put the decoder back into the loco and tested it once again on the main line track, and it ran fine.
The only explanation that I can offer is that the decoder became unseated during the derailment with the 8-pin connector slightly separating from the small circuit board chip.
Anyone else have this experience or want to offer an alternative explanation?