Yes, it seems that is the issue. I will make a PR to remove those lines (I tried removing them and works as expected).
It still should return to __assert() under the conditions where an application assertion occurs. __assert will exit. The normal normal conditions are not in an interrupt handler and and not in the IDLE thread.