This is an extremely cheap function (just checks that the coin CTxOut isn't null) that doesn't need to be gated on check_ratio.
Run coin.IsSpent only once in a row
This is a partial backport of core#22677 and core#24102
https://github.com/bitcoin/bitcoin/pull/22677/commits/64e4963c635ec3a73a5fa3f32f6ec08e70609f60
https://github.com/bitcoin/bitcoin/pull/24102/commits/fa2bcc4e42e7fed61727b3de4019e9702d4090ce
Depends on D12443