Detect duplicate productions.