So, what is the diagnosis? Was there a short between the uninsulated chassis and components on the decoder? Was the original problem (where motor was activated by turning on the headlights) caused by the decoder installed upside down? Inquiry mind wants to know.
With the current headlight problem, if you reinstall the dummy decoder plug, do the headlights work ok?
If yes, then the problem is with the decoder. It can be hardware-related (blown headlight function outputs) or possibly software-based (some CV setting which reprogrammed the headlight functionality).
Another clue might be to (in a darkened room) remove and apply power to the decoder (by tilting one side of the loco off the track and putting it back on the track). When the power to the decoder is initially applied, most Digitrax decoders will produce a very short and dim pulse to the headlights. If you see that flash then there is a good chance that the decoder hardware is ok (the problem is most likely with the CV programming).
Welcome to the wonderful world of DCC. This is what happens when we start installing programmable computers (that is what a DCC decoder is) in our tiny toys.