Fold variable that's only used in assert into the assert.

Avoids unused variable warnings in Release builds.