Fix incorrect value for the triggered_by_id column.

Fixes #5279