Workaround for https://github.com/couchbase/sync_gateway/issues/324