force a duplicateKey check at the end of the if statement.
Authored by: SeanZ 2012-09-21
Parent: [r6362]
Child: [r6364]