MB-35943 Fix index out of range error
MB-35943 Fix index out of range error

The skipped list is used to avoid waiting for a response for a
message that was not sent, but before checking the next element of
the list we have to confirm that there is a next element.

Change-Id: Ib442249baa317a4baeb4520213bc83073bcf69a6
Reviewed-on: http://review.couchbase.org/114668
Tested-by: Build Bot <80754af91bfb6d1073585b046fe0a474ce868509@couchbase.com>
Reviewed-by: James Lee <d8c596dede5f1eea3b1030b95e7922790d6e257e@couchbase.com>

couchbase/couchbase-cli,couchbase/couchbase-cli