Restore the parent cleaning logic in prune_tree()
Reconstruct the variant of the prune_tree() parent cleaning to consider all elibible parents in a single loop as we were doing before all the changes that led to this commit.
Edited by Michał Kępień