This removes roughly 5000 branches in my testing. We never want to trigger assertions even during tests, so this is sane. Implements #15400.