Use ancestor's link_local_name(int i), link_name(i) and get_link_index_from_name...