Debug asserts aren't enabled by default in optimized build

fixes #17081
Hm, where does the `optimize` configuration get defined?

```rust
fn main() {
    println!("{}", cfg!(optimize));
}
```

prints false with or without `-O`.