Add an assertion to make sure we are not dividing by zero. (Found by scan-build)