Remove side-effects from assert() calls. #3545

In some configurations, the compiler on Mac OS 10.8 will turn assert()
calls into no-ops, leaving the argument unevaluated. Any side-effects of
the argument (such as the ++ operator or function calls) will not occur
in this case.