[FIXED] Invalid print session

@meredydd @eli
From time to time I get this error as well. The strange thing is that when I try the same output it succeeds. So it happens sometimes and can mostly be overcome by trying again.
Still, it is confusing for users.

Here is a log session (ID: ASHVVE7VWQEGI7SLRWEH2EYQ2FV23M6M):

Starting MainForm
MainForm: before select panel
MainForm: before update
Starting MainForm
MainForm: before select panel
MainForm: before update
Starting MainForm
MainForm: before select panel
MainForm: before update
AnvilWrappedError: Invalid print session
at /downlink/anvil/pdf.py, line 17
called from /downlink/anvil/pdf.py, line 30
called from data, line 38
called from data, line 72
called from MainForm, line 111
called from CheckPanel, line 47
called from CheckPanel, line 47
called from CheckPanel, line 37
called from MainForm, line 78
called from ProgressPanel, line 24
AnvilWrappedError: Invalid print session
at /downlink/anvil/pdf.py, line 17
called from /downlink/anvil/pdf.py, line 30
called from data, line 38
called from data, line 72
called from MainForm, line 111
called from CheckPanel, line 47
called from CheckPanel, line 47
called from CheckPanel, line 37
called from MainForm, line 78
called from ProgressPanel, line 24