Make notification task back stack consistent to activity flow.

Fixes #4956.