Ground could be an issue. Something momentarily drawing a large amount of power or nearly shorting out could also cause it. Isn't the fuel pump electrically driven? If so, if there is a severe voltage change it could effect fuel pressure delivery, causing the engine change....
D-Max trucks do not have a factory fuel pump. The fuel is pulled from the fuel tank, through the fuel filter by the CP3 pump, where it is pressurized to the injectors. That is why you must hand pump the fuel system after a filter change. Also, any leak in the filter or lines will cause the engine to fail to start or stall after starting.
Chevy 04.5 LLY, 2X, shell, XDR, MikeL Heavy duty up-grade, 6spd, TransGo, deep pan, de-badged, 65 Gallon replacement Aero tank, LBZ-mp, Kennedy pump, shimmed, Pre-fuel filter, tow mirrors, BU cam, gauges, GPS, Sirius, bags, custom grille, fender vents, HD trans cooler- Curt front hitch, footwell lights, load lights, Studs, head gaskets.