* This is usually cheaper than calling {@link #getNodes()}.
*/
private NodeSet getNodesFromIndex() {
final StructuralIndex index = broker.getStructuralIndex();
final byte type = test.getType() == Type.ELEMENT ? ElementValue.ELEMENT : ElementValue.ATTRIBUTE;
final NodeSet result = index.scanByType(type, axis, test, useSelfAsContext && inPredicate,
context.getDocumentSet(), context, contextId);
realDocumentSet = result.getDocumentSet();
return result;
}