[verifier]Check generic constraints for duplicates. Fixes #1782.