Sounds like you have it figured out but I have had this problem twice on two different XJ's and the solution was different for each.
1) '93 XJ - injectors were pretty clogged and weren't atomizing the fuel very well. I couple of tanks with injector cleaner fixed them up and also improved fuel economy
2) '90 XJ - hose was loose on the fuel pump (in the tank). It creates the same issue as a bad check valve. What essentially happened is that the hose that connects the pump to the output tube had gotten old and could flex off of the tube a little so while it would build pressure (eventually), it was also working its tail off to spray gas around the inside of the tank. If this is your problem, a new check valve is only a band-aide since it will help maintain pressure when sitting but your fuel pump will have to work harder than normal and that hose will eventually weaken enough to blow off. The fix was to crawl under the beast, remove the fuel pump and install a new hose (with clamps this time).
HTH