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

Change-Id: Idc2f9bbf2f0b3d9decabf3074fefee6a6393a6d7
Reviewed-on: http://review.couchbase.org/24430
Tested-by: xiaoqin ma <maxiaoqin2005@gmail.com>
Reviewed-by: Michael Wiederhold <mike@couchbase.com>