The validation was clearly added on purpose. This is what happens if I make it private.

 ```
Caused by: org.infinispan.notifications.IncorrectListenerException: Cache listener class org.infinispan.query.backend.QueryInterceptor$KnownClassesRegistryListener must be public!
	at org.infinispan.notifications.AbstractListenerImpl.testListenerClassValidity(AbstractListenerImpl.java:153)
	at org.infinispan.notifications.AbstractListenerImpl.validateAndAddListenerInvocation(AbstractListenerImpl.java:116)
	at org.infinispan.notifications.cachelistener.CacheNotifierImpl.addListener(CacheNotifierImpl.java:438)
	at org.infinispan.CacheImpl.addListener(CacheImpl.java:534)
```