Fixed cas checking

Change-Id: Ie42a4932a77841947480b3a4c3d6a2ae1f1c5aac
Reviewed-on: http://review.couchbase.org/25533
Reviewed-by: Matt Ingenthron <matt@couchbase.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>