1997 Subaru Wagon

Transmission problem
1997 Subaru Wagon 6 cyl All Wheel Drive Automatic 173000 miles

Last week I just had my car engine overhauled, because of a blown head gasket. Now I am having a shifting problem, which I did not have before the engine was repaired. It happens only going up a hill at 40 to 45 mph. It shifts rough and makes a thumping noise, I do not lose power and the engine continues to function, no lights or gagues indicate that anything is amiss. It does not happen all the time, and does not happen when a mechanic is in the car, so they can not make a determination of what the problem might be. Can you offer a solution.
February 10, 2009.

Hi: check for pinched wires or damaged vacuum lines.