Avoid the use of an uninitialised variable. In reality, this is a non-issue
since the calculated value is not actually used in the uninitialised case.
Change the code so that we only do the calculation if we actually need it.

Issue detected by clang and reported by both brad@ and Brent Cook.