Accept duplicates when they're all the same.

Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Merge pull request #2077 from ezyang/ezyang-accept-duplicates

Accept duplicates when they're all the same.