Fixes intermittent rendering stop

To replicate the issue:
1) open http://people.mozilla.com/~ydelendik/pdfjs-ttf-2012.pdf;
2) if not on first page, goto first page, and refresh;
3) click presentation mode;
4) hit right key and mouse click.

Empty/white page is shown.

May also fix other intermittent failures during rendering.