Debug asserts aren't enabled by default in optimized build

fixes #17081
> sorry if my pr was flawed :/

Don't worry. :smile: