In BaseIndex::Sync(), pindex in Rewind(pindex, pindex_next->pprev) isn't always equal to m_best_block_index since m_best_block_index is updated every SYNC_LOCATOR_WRITE_INTERVAL seconds, during which multiple pindex update could happen. Thus the assert here is wrong.
Backport of core#32878.
Depends on D20435.