toValidatedSet

Returns these elements as a set, or throws if decoded input contained duplicates.