improve performance of string concat (fix wrong matching order)