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 
if (fMockDb) {
                DbMpoolFile* mpf = pdb->get_mpf();
                ret = mpf->set_flags(DB_MPOOL_NOFILE, 1);
                if (ret != 0)
                    throw std::runtime_error(strprintf("CDB: Failed to configure for no temp file backing for database %s", strFile));
            }
            ret = pdb->open(nullptr,                               
                            fMockDb ? nullptr : strFile.c_str(),   
                            fMockDb ? strFile.c_str() : "main", 
                            DB_BTREE,                           
                            nFlags,                             
                            0);
            if (ret != 0) {
                delete pdb;
                pdb = nullptr;
                --env->mapFileUseCount[strFile];
                strFile = "";
                throw std::runtime_error(strprintf("CDB: Error %d, can't open database %s", ret, strFilename));
            }
            if (fCreate && !Exists(std::string("version"))) {
                bool fTmp = fReadOnly;
                fReadOnly = false;
                WriteVersion(CLIENT_VERSION);
                fReadOnly = fTmp;
            }
            env->mapDb[strFile] = pdb;
        }
    }
}
void CDB::Flush()