Change the prune_ancestor method visibility from protected to public