Why doesn't this work for discontiguous buffers?