Astra Mk4 1.8i SXi 2000

About a week ago had problems with engine being hesitant and reluctant to rev at the top end. Eventually exhaust emission light comes on and symptoms become worse;
Idling erratic, usually too high, hesitant and juddering when putting foot down, okay about town 30 - 40 mph but nothing over 60 mph. Excessive fuel consumption. Engine had gone into 'safe mode' to protect itself.
Local mechanic unable to pinpoint cause without diagnostic check, could be changing things unecessarily becoming expensive.
Unfortunately a trip to Vauxhall for the £75 test. Came up with airflow sensor. Quoted £160 plus the £75, £235 total.
It was on record that the same sensor was faulty 2 years previously and had been replaced. Complained about the fact it only lasted 2 yrs but fell on deaf ears.
Rang local mechanic, part cost £85 (genuine Vauxhall) and £5 to fit it. It takes longer to unbox it than fit it, two jubilee clips. Had part 1 hr later and fitted before I finished moaning about Vauxhall service.
Just thought I'd share this experience as this seems to be a common fault with these engines. I know the symptoms described can be caused by a number of faults but worth bearing in mind.
It is annoying that twice I have had to pay out for a sensor which is supposed to identify a fault, when in fact there was no fault apart from the sensor itself.