Added additional guard to the behaviour DOM event handler function to prevent rare situations when the widget is destroyed synchronously during previous event handler execution.