Opening the exhaust and fitting the air filter cover would certainly not cause this behavior. Something else is amiss, coincidentally.

Unfortunately it's all but impossible to diagnose these things from afar. A few likely culprits though, might be lack of fuel pressure (i.e. a failing fuel pump or plugging fuel filter, which sets the system pressure), the crank position sensor, or loose plug ends.

You can check the first by turning on the key (don't start the engine-accidentally spraying fuel over a hot running engine is not recommended) and measuring the pressure at the schrader valve on the injector housing on the right hand cylinder. A regular air pressure gauge can be used in a pinch, though it will of course become gasoline soaked. You are looking for 58psi there.

Crank position sensor testing is covered in an earlier post on this forum that I can't seem to find at the moment. I've never had to check one personally.

Loose plug ends (the small threaded bit on the top end of the plugs) are common on this high vibration engines, but are easily fixed by crimping them tight with pliers or the use of a liquid thread locker (Loctite et al).

I'm sure others will chime in with additional ideas as well.


Steve
Late 2012 M3W