Remove useless duplicate comparisons.
Remove unused values in builtin_set.