The fault might not be for the airflow sensor itself, but for the amount of airflow measured by it... kinda like the O2 sensor faults for lean mixture.
I'd check the condition of hose #11 in the link below just to make sure it is intact and has no splits etc, and really check the vacuum hose that goes to the valve pictured on the right in that link.
RealOEM.com * BMW E53 X5 3.0i EMISSION CONTROL-AIR PUMP