ignore non-element nodes in dom.nodeIndex