Fix -Wunused-variable in non-assert builds. No functionality change.