I have been a P38 owner for 12 years and recently picked up another 1998 Range Rover P38 4.6 that was running but throwing exhaust gases from the head gasket when I bought it. I was able to drive it home at freeway speeds with reasonable power. About a week later I drove it from my home to my mechanic, about 1 mile away, where it started to lose power and I assumed it was running low on fuel. My mechanic replaced the head gasket, did a valve job, and put it back together. From that moment on it has had the same persistent problem. It will idle reasonably well with a little bit of fluctuation, but then when the accelerator is pressed it will start to knock, choke, hesitate,idle poorly, and will rarely go over 3000 RPM and is eventually accompanied by a strange foul smell. Upon further investigation I discovered that one of the catalytic converters had been melted so they've been replaced with an exhaust system from a previously known running vehicle and appear to be breathing fine. After clearing 9 fault codes I am still getting both P1509 and P0340 no matter how many times I clear the faults and then run the vehicle. The ignition wires and plugs are new. I have replaced the camshaft position sensor with with a new one with no difference. The idle air control valve, fuel rail and injectors, have all been replaced with ones from a vehicle that was known to run well before. I would appreciate any suggestions!