Try resetting the computer, maybe. Take off both battery cables and see what that does? Best thing I can think of. I guess it could be flashed, or maybe disconnect the CPS. I don't know... weird problem.
Replacing the flex plate does't have anything to do with the motor running rough unless he shorted the starter out against the frame. What year and model is the 4X4? He probably pulled something loose and hasn't reconnected it. I would start by checking vacuum lines to the tranny and around the fire wall at the back of the motor. my .02