Update ItemDuplicates.cs

This should eliminate the efficiency concerns, though I never tested it so please test it to be sure :)
Also fixed cargo-cult programming code
Merge pull request #1 from BlueRaja/patch-1

Update ItemDuplicates.cs