Improve r172464: const_cast is not needed if the variable is not const