fix #3968 (broken assertion logic :x)