FYI - I found the underlying issue:
https://issues.jboss.org/browse/ISPN-2182

Ah, yes, the legacy --> current config transformation looks like the biggest non-tested stuff ever. ;-)
As I've previously had to fix a few similar, if not almost the same, issues before - wrt indexing.

A workaround for the issue, as well as the complete 5.2 upgrade can be
found in this branch:
https://github.com/pferraro/jboss-as/tree/infinispan

Shouldn't this be fixed in Infinispan directly?
(as that's where I had to fix my indexing config issues)

I haven't actually used infinispan-query, so I don't know if
infinispan-core needs to have its classes visible.  Can you comment?

https://github.com/capedwarf/capedwarf-jboss-as/blob/master/build/src/main/resources/modules/org/infinispan/main/module.xml

Afaik, it's needed for Infinispan to pick-up Infinispan-Query's extension/integration hooks;
e.g. org.infinispan.query.impl.LifecycleManager in META-INF/services ServiceLoader pattern

As you can see, the module is marked as optional, as I mentioned,
we should be fine if it's not there, so, imo, this could be added by default.

-Ales