Replace unnecessary str_copy() calls.