`assert` is optimized out in release builds, use `errorstream` and `abort`.  This also won't fail as it doesn't have a `== 0` check.