Fixes nesting bug in noDuplicateKeyRule.
Merge pull request #205 from mark-buer/noDuplicateKeyRuleFix

Fixes nesting bug in noDuplicateKeyRule.