in repeatTensor, fix non-contiguous case.