Fix IllegalArgumentException during statement preparation

patch by slebresne; reviewed by thobbs for CASSANDRA-6592