Detect and repair identity/grouping/typedef conflicts