Emit "work" and "lvl0" flags; adding logic to determine when a record is effectively used as a work record, even if it's a physical database record.