s4:lib/messaging: use a helper variable for tdb flags