I had the same problem with my 97, and according to a very good mechanic friend of mine, most of the jeep 4.0s and alot of the dodge dakotas have the same hot restart problem.
Here is what he told me:
Rather than having the fuel presure regulator on the intake fuel rail, jeep put them in the tank with the pump, as well as the return fuel line that would normally run from the main regulator back to the tank. When you shut it off hot, the gas in the fuel rail vaporizes, but keeps the pressure in the rail. So when you start the jeep, it runs rough, cause the lines are all still under pressure, but you have to burn off the vaper before the good fuel will get there. This is where your misfire codes come into play, while trying to burn off the vaper, the motor stumbles, and the computer sees it as a misfire and causes the cel to come on.
If you give it a sec, and dont floor it, just let it try to burn it out, or shut it off real quick and then turn it back on, then it will clean out the vapor, and get fresh fuel to the rail. My cel will come on during this crap when im wheeling, and that is the only time it happens to me, just when im wheeling hard, but after a few more stops (air up at end of run, get gas, etc.) the cel will go out on its own, i have never had to have the code cleared or unplug the battery to get it to clear.
Hope this helps, sounds like it is a standard issue, he says make the fan run longer after shut off by grounding out the relay for it with a switch( you have to shut the jeep off, then turn the key back to on) hood vents, hood spacers, or cowl hood.
He works on the local PD Cherokees and that is one of the biggest problems the local PD has with the jeeps, they shut them off to do something, and then need to go again real quick (ie speeder in speed trap :flamemad: ) and they cant get the jeep running to go fetch the ticket.
If he is wrong, let me know, cause im also anoyed by it. Out of the 4 xjs that wheeled in our group last week end, both of us that have sealed hoods had this problem, and the other two had spacers or vents, and claimed they had had the problem right up till they modified the hood or added spacers.