I am having a bit of bother with my 04 E46 M3

She has a engine stutter between 2.5k and 3k Rpm. In most cases she is absolutely fine outside of this

However on two occasions the engine warning light has come on and she stutters through the whole Rev range for a few moments, then the engine lights goes of and I am back in business.

I am thinking MAF???

Any suggestions???