It now checks before it uses totals that don't exist for bug #8368.