One possibility is that you've made a loop by catching all of the events and reporting them via your new extension's event block, which will trigger your code again, ad infinitum. Your extension is observing the same system it's a part of and therefore things can get tricky.
Another approach might be to replace form$Mnenvironment
with a special subclass that will return a function object that can be applied when an event name style signature is detected. Again, you'll want to make sure you aren't reporting your own extension's events otherwise you'll get stuck in an infinite loop (or stack overflow, killing the app).