Performance improvement for ParentNode::find