Error with the REASONER ON

I am trying to run this query, but with the reasoner ON, it gives this error

Failed to run query: com.complexible.stardog.plan.eval.operator.OperatorException: Uncaught error during query evaluation: ArrayIndexOutOfBoundsException:

With the reasoner OFF.. it runs correctly... Any help?

Here is the Query:

PREFIX geom:

PREFIX geos:


SELECT (COUNT(?o1) as ?count)


geom:Caerffili___Caerphilly ?p1 ?o1 .


Typically using a variable in a predicate position is an anti-pattern, as this query would balloon out all possible predicate axioms and inferences to try and satisfy the semantics.

A way to work around this would be to introduce a parent predicate, that all of the properties are subPropertyOf, and then use that in place of ?p1 here. Referring to open ontologies, you could place this parent property and the subproperty definitions in your own ontology/named graph, and include the lot of them together with reasoning.schema administration to keep the queries simple.