Fix notification buffer race conditions

**NO MERGE YET**. Pending on test harness.

Harness and unit test test are working.