fix `reallocate_inplace` with small allocations