Dedupe the URIs in the stub.
Return a set of URIs rather than a list to ensure deduping.