Avoid overwriting notifications for template assertions.

Fixes #616.