Simplify the dispatch logic

Change-Id: I358ff06eae7c8b762451b2a46067af79d5b22f9d
Reviewed-on: http://review.couchbase.org/34933
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>