Fix a case where a notification observer could be added and never removed, leading to crash in the test suite (and possibly in other situations). Also fix a test that was checking on a wrong condition in its assert.
Fix a case where a notification observer could be added and never removed, leading to crash in the test suite (and possibly in other situations). Also fix a test that was checking on a wrong condition in its assert.