Fix assertion encountered when using heap_buffers

Patch by tjake; reviewed be belliottsmitch for CASSANDRA-7862