Actually, I also use the HashSet to deduplicate the Ids.

Would rewriting this into the following make the intent more clear?

```csharp
var targetsSet = new List<ObjectId>(targets.Select(c => c.Id).Distinct());
```