Fixed a bug where notification header could become empty

Also fixed a few more issues with the header util that could
lead to wrong states.

Change-Id: I95c3479f5d9e5221ee9e91120271e7957b887607
Fixes: 28295743
5 files changed