Mucking about with O(N^2) hashset nonsense.