A minor cleanup of the channel duplication code.
- Use unordered_set as we don't need a map, only to check existence.
- Use find instead of [] to provide better signaling of what we are doing.
- Use explicit insert.
Note the find/insert could be combined for a more efficient operation, but it is a little less readable and this code is only executed once.