smartxml: handle node being a root in DocumentNode.getIndex