Resolves #6 by an allowDuplicates option