fix bug in release build; call to is_terminator inside assert still needed