This is to track the regression introduced in master, which needs fixing for 0.14. See #9240, #9371, etc.
{
    assert(pindex->GetBlockHash() == view.GetBestBlock());
    if (pfClean)
        *pfClean = false;
    bool fClean = true;
    CBlockUndo blockUndo;
    CDiskBlockPos pos = pindex->GetUndoPos();
    if (pos.IsNull())
        return error("DisconnectBlock(): no undo data available");
    if (!UndoReadFromDisk(blockUndo, pos, pindex->pprev->GetBlockHash()))
        return error("DisconnectBlock(): failure reading undo data");
    if (blockUndo.vtxundo.size() + 1 != block.vtx.size())
        return error("DisconnectBlock(): block and undo data inconsistent");
    
    for (int i = block.vtx.size() - 1; i >= 0; i--) {
        const CTransaction &tx = *(block.vtx[i]);
        uint256 hash = tx.GetHash();
        
        
        {
        CCoinsModifier outs = view.ModifyCoins(hash);
        outs->ClearUnspendable();
        CCoins outsBlock(tx, pindex->nHeight);