Get it reflashed. I remember reading a project where a guy dropped the drive train from a 5.4 150 into a 78/79 bronco. He had your same problem, turns out there was a computer problem on a small number of trucks in 04, had it reflashed and the problem cleared up.
Edit, here it is. At the very bottom he talks about it.
http://home.comcast.net/~qcrispin/br...me4/frame4.htm