DB IDO: Fix the way notification_id is handled.

Fixes #5103
Fixes #5265