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