I friend of mine has had trouble with the power "breaking up" above 4000 rpms with his jb4. Its on and off though. I would do new plugs and if that doesn't help, check coils.
2008 335xi AT
Cobb AP stage 1, drop in filter, the rest stock
email@example.com w/ 1.86 60' (5,800' altitude)