Fix over-eager regex concat optimization