Override equals/hashCode in CompositeEventHandler.