Check for duplicate keys.