[Security] made sure that the exception listener is always removed from the event dispatcher at the end of the request