MFC r356660: Fix division by zero issue.
Thanks to Stas Denisov for reporting the issue for the userland stack and providing a fix.