Fix performance regression from CASSANDRA-5614

patch by Sam Tunnicliffe; reviewed by Aleksey Yeschenko for
CASSANDRA-6949