I struggled with the above ordering issue, and another similar issue related to deconfirming in the case of an invalidated block under a valid header chain, and another related to block hash malleability. I ended up implementing a relatively simple concept between the check chaser (block download with block.check() context free validation) and the channel download protocol that fans out to provide concurrent download/check. Basically the problem was that there was no way to invoke code at the completion of a purge in the downloading as a consequence of a reorganization or disorganization (which I refer to as regression - where the chain moves backward before moving forward again). I added a new race class to manage this, which has almost no cost.