XMLIndexHandler expand_node_indexes refactored