Collapse matching and adjacent labels in identifiers.