Firstly, well done for sorting it.
But, I see it a lot on this and other forums, but there are too many faulty MAF diagnosis issues going on. Your problem was never the MAF, it was a vacuum leak in the brake vacuum which you sorted with a simple clip.
Not wishing to put a downer on what is a positive day, but it is very frustrating to keep reading "buy a new MAF" posts when these are very rarely the issue. It just reads like you wasted £295 to be honest.
Testing a MAF is easy, you just unplug and see what happens to the engine. I'm sorry you had to go and buy a new one for no reason, but you're not the first. I write this really to help other people who have the same issue as you, so they don't make the same error.