Fixed broken locate_node ancestor restriction