Hi Ed, The exhaust leak shouldn't cause this problem. Has the transmission fluid level been checked? If the fluid is low, this will cause this problem, if you don't see any leaks, and you have 4WD, then there may be an internal leak into the transfer case. If this is the case, have a repair shop refer to the technical service bulletin from Ford, TSB# 97-12-13
I have a ford f250 powerstroke 1996. Speedometer was not working had hard shifts to second and third. Was told by three mechanics it was tranny. Since this truck has 125k miles had a problem with that. I knew it was speed sensor due to my research in fact it was just the fuse that connects speedometer, was not talking to speed sensor. Replaced fuse shifts perfectly. Thank God it wasnt tranny.