That's common behaviour on modified SEs producing more than ~135 rwkw and is the fault of the OEM ECU because it's not providing enough fuel to the engine. 4500rpm is the usual number people quote for this (use this number if doing Google searches).
At ~5000rpm the ECU switches from Closed Loop mode to Open Loop mode which is why you see the improvement (ie. in Open Loop mode it's just doing a table look-up, supplying the fuel that corresponds to the air provided; in Closed-Loop mode the ECU is getting feedback from a bunch of sensors to calculate the amount of fuel required - unfortunately at around 4500rpm the OEM ECU thinks it's providing too much fuel and actually cuts it, which is why you feel the stumble).
The OEM ECU was designed to make the car feel like it had a small V6 and power delivery was smooth (and dull). It was never designed to operate much beyond this and you start seeing issues after mods creating over ~135rwkw. I quote this "over ~135rwkw" figure since I never had any issues with a FM downpipe, AEM CAI and boost increased to 10psi and that combination generates ~135rwkw. Once I added a 2.5" exhaust and bumped the boost to 12psi, I experienced boost cut problems and the car ran rougher (even after adding larger 305cc injectors).
There are band-aid solutions like FM's O2 signal modifier - this works well for some but not for others.
When I had a stock ECU, I had this and the "boost cut mod" which "fixed" this issue:
http://www.mazda-speed.com/forum2/index.php?topic=11873.0http://www.mazda-speed.com/forum2/index.php?topic=19608.0Even with these mods, including larger 305cc injectors, my car ran rough until warmed up.
The best solution for modded SEs is an aftermarket ECU.
FYI: The SE is referred to as a MazdaSpeed Miata in the US and there is a dedicated site for this,
http://www.mazda-speed.com. Unfortunately it's now read-only, rather than being shut-down completely. You can still find valuable information there if you use Google to do searches using the
site keyword:
eg. use "boost cut
site:www.mazda-speed.com" as the search string.
Unfortunately some of the pictures no longer work but it's still the best site for SE-specific issues.