Regarding the car that keeps running if a door is open during shutdown:
I had a similar problem on a Porsche 914. The car would keep running if the
lights were still on. I found a dual circuit stop-turn/tail lamp socket
with s single element bulb installed, which shorted the tail and stop-turn
circuits together. Apparently the tail lamp voltage was going backward into
the stop-turn circuits and thence to the ignition.
For your XJ, I’d start pulling fuses until you isolate the exact circuit.
Visit the Jag Lovers homepage at http://www.jag-lovers.org for exciting services and resources including Photo Albums, Event Diary / Calendar, On Line Books and more !