Revert "Changes to prune_duplicates"

This reverts commit 8bcafea46eba4f7c86b015fc42a79f2317bb4870.