This copying is an unnecessary allocation, since we only use the set privately anyways.