Can somebody tell me what usually sets off the "Uncaught TypeError: Cannot read property 'isEvent' of undefined" error?

I added listener to beforedestroy event in a panels initComponent method and get this error every time the panel gets removed from the container class.
The event handler itself does nothing but console.logs.