MDL-37072 cachestore_mongo: better extendedmode handling