fix removal of unopened notifications

see numbas/editor#192