Fixed another issue with NotificationPanel going away before it should. Added comprehensive tests for it.