MDEV-25743, the function dict_check_sys_tables() was simplified in such a way that the mini-transaction will not be committed and restarted during the loop. But, we failed to adjust the call that would advance the cursor position:
It is unclear to me why this would not cause failures much more often. The incorrect call would attempt to restore the persistent cursor position while we are already holding a latch on the page. Recursive S-latches are not supported and could lead to a hang. A hang should however not be possible, because the purge of history is not yet running at this point of time, and no other thread should be acquiring conflicting latches on the page.