In the Bitcoin Core source code
https://github.com/bitcoin/bitcoin/blob/21ee676dd6a7d9704367b6412bf8e1e443ec2b5b/src/chainparams.cpp#L139 I see that the latest checkpoint is at height 295000.
If I understand correctly, this means that today a miner could produce a block with height 295001. Although this block would not go into the main chain of course it still has to be validated by all nodes, and if valid, it would go into the secondary chain pool.
My question is, how is this block validated, since it is not known anymore what the state of the UTXO set was at height 295000. My guess is that in order to validate, the node has to temporarily reorganize the UTXO set to height 295000, check if block 295001 is valid, if yes store it, otherwise reject it, and then restore the current state of the UTXO.
Looks like a lot of work. Is that the way it works?