Avoid some array copies in merge sort