Fix inclusion of class methods in exception handler