fix detection of common buckets/servers

Change-Id: Idf3cb07892e1e99288c7c6e50a4e5f1879e669a9
Reviewed-on: http://review.couchbase.org/31479
Tested-by: buildbot <build@couchbase.com>
Reviewed-by: Pavel Paulau <pavel.paulau@gmail.com>