KT-4576: (Bug fix) Intention to transform an if an AssertionError throw into an assert

accidentally pushed a PR from the wrong branch
;/ sorry