The newr B's say post 2000 had then in the the throttle body, a small resistor type look somewhere on the air intake. over £350 to replace.
Have you also checked your Spark plugs? Injectors? Lamba sensor?
If the MAF is playing up I would expect it to drive badly, not go over 3000 revs. I think you have a fuel issue.
Check your spark plugs 1st, re-set the ECU - Take of the negitive for 60 sec's, then put back, start the car and idle for 5 mins. Then drive like you normally to.
If this does nothing try fuel cleaner to see if the injectors are dirty.
Let us know how you get on.