Debug asserts aren't enabled by default in optimized build

fixes #17081