MB-7597: correct the logic of updating bgfetcher global variable

Change-Id: Ib2f460e04ec7bf0cf2c4e06b45774f9f2dd4d91c
Reviewed-on: http://review.couchbase.org/24553
Reviewed-by: Michael Wiederhold <mike@couchbase.com>
Tested-by: Michael Wiederhold <mike@couchbase.com>