When the target for backupwallet is the source wallet file or directory, the wallet file is cleared to zero length

### Reproduce
bitcoin-cli backupwallet ~/.bitcoin/

### Expected behaviour
Command should fail

### Actual behaviour
Wallet is destroyed.

Reported here
https://www.reddit.com/r/btc/comments/719kz3/just_lost_4bch_backing_up_my_walletdat_file/

Fix proposed in #11376 
std::map<std::string, int>::iterator mi = env->mapFileUseCount.find(strFile);
            if (mi != env->mapFileUseCount.end())
            {
                LogPrint(BCLog::DB, "Flushing %s\n", strFile);
                int64_t nStart = GetTimeMillis();
                
                env->CloseDb(strFile);
                env->CheckpointLSN(strFile);
                env->mapFileUseCount.erase(mi++);
                LogPrint(BCLog::DB, "Flushed %s %dms\n", strFile, GetTimeMillis() - nStart);
                ret = true;
            }
        }
    }
    return ret;
}
bool CWalletDBWrapper::Rewrite(const char* pszSkip)
{
    return CDB::Rewrite(*this, pszSkip);
}
bool CWalletDBWrapper::Backup(const std::string& strDest)
{
    if (IsDummy()) {
        return false;
    }
    while (true)
    {
        {
            LOCK(env->cs_db);
            if (!env->mapFileUseCount.count(strFile) || env->mapFileUseCount[strFile] == 0)