gui: Handle calls stranded between frames gracefully (issue #117).

Still a bit hackish (those calls will disappear), but at least the gui
doesn't crash now.