Update with code from Cassandra trunk.