Description
Due to a bug the document containing the query is responsible to resolve properties. This is necessary for Ancestor searches to determine the doctype for a property.
What should be done: derive the properties from the doctypes derived from the doctype constraint. They will be queried in the order specified with the first matching property name determining the type.