I'm new to the XG (Just bought a 2002) and car maintenance/repair in general (first car), but I'll throw some ideas out and see if they help.
(I'm a total computer geek, so hopefully my troubleshooting skills will transfer.)
QUOTE (Essex @ Jan 26 2010, 10:36 PM)

Engine is obviously running on a VERY rich mixture.
Suddenly rich + check engine light = confused powertrain-control module.
- sensor acts up, so PCM has to guess the fuel flow
- PCM guesses rich to protect the engine (better to run rich than lean)
- reboot causes the PCM to check it's sensors again. If the sensor is only intermittently bad, the engine will run fine. (suggests wiring problem, hopefully just a loose or dirty plug)
QUOTE
I've noticed that the CEL will reliably come on within 2klm of a cold start, indicating that the warming up process can cause this error.
Also, the fault can be reliably induced by a prolonged (more than 7 - 10 secs) downhill run. In other words, throttle closed and high vacuum situation in the intake.
Reliably? Yes! That's great news. (In the computer world at least it's called a "reproducible" problem.) The next thing I'd try to do is plug in a laptop-based scanner, start logging sensor values and record one or more cold starts and a couple down-hill runs. Try to make it happen on tape so you and your mechanic have more information to work with.
QUOTE
P1159 Variable Intake Motor Malfunction / MAF sensor?
P0100 MAF sensor?
Good news:
http://hmaservice.com has troubleshooting guides indexed by problem code. All you have to do is register, sign-in, and click "DTC."
Bad news: it only goes back to the '02 XG. Hopefully it won't be too misleading.
(On the 2002 XG350)
P1159 means that the ECM cannot get confirmation that it has successfully changed
intake geometry. I'm not sure that would be enough to make the engine run rich, but it's probably worth a check, especially since the motor is easy to get to and you've already replaced the MAF.
The '02 manual doesn't have an entry for P0100, but -1 -2 and -3 are three different MAF sensor checks. A failure here would definitely require the PCM to guess what the correct fuel flow should be--without the MAF it doesn't know how much air the engine is getting.
Best of luck.