I've been chasing this problem on a 1997 Jeep Wrangler with a 2.5L L4 engine for some time. Symptoms are very rough idle with occasional backfires immediately after going into closed loop. Approx. 3 minutes into closed loop operation (coolant temp. @ 190*F) the engine smooths out and runs fine. Fuel trims are close to perfect as is timing during and after problem. The only PID reading bad is the MAP sensor. With key on/engine off MAP reading should be 24-25 inHg for my altitude. The PCM is telling me it's only 8 inHg! With engine ON @ idle, MAP is @ 3.0 inHg, Load @ 7%, TP @ 14.9. All of these scanner readings stay about the same throughout, whether engine is barely running during warm up or running fine after warm up. I cannot understand with skewed MAP readings, how this engine runs at all, much less running great after reaching coolant operating temp. This is my only clue... open loop runs fine, @ closed loop it barely runs, when coolant temp reaches approx. 190 it runs great again. I did replace the IAC valve/motor since I was not capable to test it. I've checked voltage and PID for the MAP sensor even after connecting a new signal wire to the PCM. Voltage is slightly off specs. but scanner measurement (inHg) is WAY off. I suspect the PCM is at fault, but would like other mechanics inputs. I've been a Mechanic over 40 years, but am not sure on my diagnosis. Something missing?
Finally solved! As I watched live readings on the scanner it showed that as soon as the ECM started getting info from the o2 sensor, going into closed loop, the engine would run bad until coolant temp. was 130*F or hotter. I replaced the o2 sensor, coolant temp. sensor and the thermostat for good measure. IT RAN FINE! I then replaced the ECT sensor with the old one and it STILL RAN FINE. CONCLUSION: The upstream heated o2 sensor was not working correctly.
I had to dismiss all the info. the scanner was giving me, excepting that the ECM still has problems reporting correct PID's, but COULD STILL command the engine correctly. HONESTLY, replacing the o2 sensor was only an educated guess. Sometimes that's all we have. Obviously the scanner readings for the MAP sensor are incorrect, since it should not have EVER run good, relying on that information. The fuel trims too, showed almost perfect 0%, when does that ever happen? It was a true smoke screen. So, there was no guaranty any scanner readings were correct! Therefore, ignoring The upstream heated o2 sensor's excellent PID, was part of the solution. I did use two different scanners that agreed with one another to confirm.
Have you tried swapping the MAP sensor for a known good one? Have you tried then disconnecting the battery and forgetting the ECU adaptives? Now for some thoughts on the matter...
In some ways it is even more odd that it runs well in open loop operation. If the engine is calculating airflow using MAP, and there is no additional MAF sensor, then during the open loop idle this engine will be underestimating the calculated air flow into the engine (manifold pressure is underreading?) and will be putting in way less open loop fuel than is required. It will only be when the lambda sensor starts to help run the system closed loop that the engine would realise that it is running too lean and attempt to richen up.
Having said all of the above, you mention that the load is about right, load is a function of airflow into the engine at a given speed (in this case idle) and so that coupled with a correct open loop idle. Maybe the ECU has learnt a correction for dicky MAP?? very odd
I have had a few more thoughts, although the fuel adaptives may be correct, perhaps the air calculation adaptives are way off. A misfire is suggestive of too much fuel, so when you switch from open loop to closed loop the ECU is overfuelling. Can you see what the lambda voltage is doing? It may be reading lean which is what happens when under severely rich misfire conditions. As things warm up and misfire reduces perhaps the lambda comes good and then the fuelling is properly under control again.
I wonder how it would run if you ran the MAP sensor inside the engine bay (no vacuum).