Barney reminded me of another possible tool to use when trying to diagnose a stubborn problem, and it costs exactly nothing. Most sensors have a backup safe operational setting in the ECM. Simply disconnect the sensor and start the engine and see if the behavior changes, possibly for the better. The engine will start and run with the cam sensor, MAF, O2, inlet air temperature, water temperature, knock sensor and I believe even the TPS. You will get a check engine light for most of them but it can be a useful diagnostic tool. Of course it needs to operate for a while if it is temperature related. I would try the MAF sensor first.