Fix assertion encountered when using heap_buffers

Patch by tjake; reviewed be belliottsmitch for CASSANDRA-7862
Merge branch 'cassandra-2.1' into trunk