fix nasty bug where events would unregister after a cached view was rerendered