New `self_and_ancestors_ids` method to get self id with ancestor_ids