Simplify `cloneBuffer`