This is a pretty big bug. Sadly no-one recognized it so far.
Javadoc of Application.publishEvent() says:
sourceBaseType - The Class of the source event that must be used to lookup the listener to which this event must be published. If this argument is null the return from source.getClass() must be used as the sourceBaseType.
Marcus found out about it, because of the Primefaces guide to style invalid input fields with jsf (see http://cagataycivici.wordpress.com/2011/04/04/styling-invalid-input-fields-with-jsf/).
So we have to change all references to UIComponent.class to source.getClass().