You dont need to do a full tank of gas, you only need to do a drive cycle. google it, you will save yourself a tank of gas.
It's probably the reason your cars CEL did not come back on right away. A drive cycle is about 50 miles in an ideal situation.
Anyway, Good luck. If your other air mass sensor is no good, let me know. I can let you barrow mine to pass the inspection or sell it cheap or something.
Not sure if this will help:
http://www.318ti.org/forum/showthread.php?t=35885