For memory efficiency, if it's already a Set, don't clone the Set.