When combining regular expressions, must adjust group numbering to make
sure the group references refer to the right groups.