Partial fix for #13761.

https://issues.dlang.org/show_bug.cgi?id=13761
Clang static analysis says that it is possible.
OK I switched to an assertion here.