I feel compelled to chime in as I hunt for seats.
The mileage gauge SHOULD read 0mpg when you're not moving. No codes? Vacuum leak would probably cause a funky idle.
ANd I'm not sure about your BMW's specifically, but it's probably a combination of vacuum and VSS that controls that (Just a guess). When vacuum is high and VSS is reading 0, it knows you're at 0 mph, and mileage should read 0. What IS your vacuum at idle?