Fixed duplicate constraint generation