Fix memcpy/memmove bugs in timsort