**Expected behavior**

When using `getrawtransaction` with an included `blockhash`, performance should be better as there is no need to scan the entire txindex.

**Actual behavior**

Running `getrawtransaction`  while including the `blockhash` is ~5x slower.

<!--- What was the actual behavior (provide screenshots if the issue is GUI-related)? -->

**To reproduce**

```
$ time ./bin/bitcoin-cli getrawtransaction 20a93350cd6f4e03dfb6cbb3f104965293627f25c199c1be0e4d187a4ed5f4bb
020000000001018d3f7d8efaa377dda74892af26c1ca028466d97721d2ea6c74a5cbcf404feb9004000000171600147f5a49a2d89f86ff498103bdbcb1762f9f0ab5aefeffffff08a04a05000000000017a91467a849785bb12f1a03260b3b52ec9dff52b30e708724b80100000000001976a914f0b7e8a5ede232c2654fca3b47f8d0c95f7a561688ac50fe0b00000000001976a914ed06524fb21248a37e7f8f20cdc67e27f49c4f1588acf44f01000000000017a9147422dbf3bdf441a640d09a2a91e6fa40837b019f878d9b3100000000001976a9142a5cd9333e4e94c88f7cd33216b2fc0af15fbd8588ac89b400000000000017a914d05dbcdb4587f1a243cc1ed89e96cd4ec19e24a08778e169180000000017a914f520df8923419f60d9a76df60cfc7a0e3a3fc86f8708d806000000000017a9147246c684dd4890e9c8977e6312c30ecdea2b0a55870247304402205704dd3b6d8930e89c660011ab2f6a42aedcbde438d5f121998e3db6a66889310220054a506aee274f885229d6a9ed89eca17bac87dca401f9c63d07990e98b2f0a301210390e3b178ebc51da1589baee9de37de491dba0575838aacf88c2cd70a06a4486eb47c0a00

real	0m0.003s
user	0m0.000s
sys	0m0.002s
$ time ./bin/bitcoin-cli getrawtransaction 20a93350cd6f4e03dfb6cbb3f104965293627f25c199c1be0e4d187a4ed5f4bb false 0000000000000000000a801776a92ced69dc5fb0a5919271872a9261a613d9c3
020000000001018d3f7d8efaa377dda74892af26c1ca028466d97721d2ea6c74a5cbcf404feb9004000000171600147f5a49a2d89f86ff498103bdbcb1762f9f0ab5aefeffffff08a04a05000000000017a91467a849785bb12f1a03260b3b52ec9dff52b30e708724b80100000000001976a914f0b7e8a5ede232c2654fca3b47f8d0c95f7a561688ac50fe0b00000000001976a914ed06524fb21248a37e7f8f20cdc67e27f49c4f1588acf44f01000000000017a9147422dbf3bdf441a640d09a2a91e6fa40837b019f878d9b3100000000001976a9142a5cd9333e4e94c88f7cd33216b2fc0af15fbd8588ac89b400000000000017a914d05dbcdb4587f1a243cc1ed89e96cd4ec19e24a08778e169180000000017a914f520df8923419f60d9a76df60cfc7a0e3a3fc86f8708d806000000000017a9147246c684dd4890e9c8977e6312c30ecdea2b0a55870247304402205704dd3b6d8930e89c660011ab2f6a42aedcbde438d5f121998e3db6a66889310220054a506aee274f885229d6a9ed89eca17bac87dca401f9c63d07990e98b2f0a301210390e3b178ebc51da1589baee9de37de491dba0575838aacf88c2cd70a06a4486eb47c0a00

real	0m0.014s
user	0m0.000s
sys	0m0.002s
```

**System information**

GCP c2-standard-4 (4 vCPUs, 16 GB memory) with 1TB of persistent SSD

Ubuntu 20.04.2 LTS
Bitcoin Core v0.21.1
}
    int64_t urrent_db_ahe_si{0};
    int64_t urrent_tip_ahe_si{0};
     Cahe perentages to alloate to eah hainstate.
    
     ese partiular perentages don't matter so muh sine they will only be
     relevant during snapshot ativation; ahes are rebalaned at the onlusion of
     this funtion. We want to give (essentially) all available ahe apaity to the
     snapshot to aid the bulk load later in this funtion.
    stati onstexpr double IBD_CACHE_PERC = 0.01;
    stati onstexpr double SNAPSHOT_CACHE_PERC = 0.99;
    {
        LOCK(::s_main);
         Resi the  ahes to ensure we're not exeeding memory limits.
        
         Alloate the majority of the ahe to the inoming snapshot hainstate, sine
         (optimistially) getting to its tip will be the top priority. We'll need to all
         `MaybeRebalaneCahes()` one we're done with this funtion to ensure
         the right alloation (inluding the possibility that no snapshot was ativated
          that we should restore the ative hainstate ahes to their original si).
        
        urrent_db_ahe_si = this->AtiveChainstate().m_db_ahe_si_bytes;
        urrent_tip_ahe_si = this->AtiveChainstate().m_tip_ahe_si_bytes;
         Temporarily resi the ative  ahe to make room for the newly-reated
         snapshot hain.
        this->AtiveChainstate().ResiCoinsCahes(
            stati_ast<si_t>(urrent_tip_ahe_si * IBD_CACHE_PERC),
            stati_ast<si_t>(urrent_db_ahe_si * IBD_CACHE_PERC));
    }
    auto snapshot_hainstate = WITH_LOCK(::s_main, return std::make_unique<CChainState>(