Fix warning on windows release builds (#1350)
A persistent and occasionally confusing warning is produced on
Windows release builds because of a conditional expression that only
contains an assert. On a release build, this amounts to nothing but
a semicolon, which produces the warning.
This folds the conditional into the previously explicit assert so
it is included or excluded entirely regardless of build type.