Deduplicate .to_set.freeze chains