DT shows only dwarves from your civ. The other dwarves (and other creatures) from other civs have similar flags to the yellow dwarves. I guess you don't see them anywhere either despite not having the inactive flags.
What is the "slight variation" between important_historical_figure from unit_flags1 and unit_flags2? Mine have both, your red dwarves have none, your yellow (and other) dwarves have only the unit_flags2 one.
There is also an extra flag in unit_flags4 that is not listed in dfhack's df-structures. But it is not the one that will help discriminate the yellow dwarves.
Edit: I tested with a longer history and I have something similar. The extra units are not of my civ so they don't show in DT, but they still have the same flags as Saiko Kila. There are only in "all" and not in "active", so reading "active" could solve the issue in fortress mode but not in embark ("active" is empty and starting dwarves are in "all" mixed with the other units).
Unit list from the embark screen:
1555 69 574 00000000 12000040 00000004 00000000 Elana Rockclutch
1573 69 574 00000000 12000040 00000004 00000000 Athe Roarice
2300 67 572 00000000 12000040 00000004 00000000 Shem Handlerelease
5919 67 572 00000000 12000040 00000004 00000000 Medtob Tourhood
20643 77 572 00000000 13200034 00000003 00000000 äs Tomecloister
20644 77 572 00000000 13200034 00000003 00000000 Zasit Swordlulled
20645 77 572 00000000 13200034 00000003 00000000 Obok Swordcontrols
20646 77 572 00000000 13200034 00000003 00000000 Reg Sabregift
20647 77 572 00000000 13200034 00000003 00000000 Inod Manytrade
20648 77 572 00000000 13200034 00000003 00000000 îton Lengthsabres
20649 77 572 00000000 13200034 00000003 00000000 Ilral Gemhail
Elana and Athe are a married couple of elven scholar (naturalist and sage), Shem and Medtob are a married couple of dwarves (bard and animal trainer). The seven others are my starting dwarves. Could they be traveling though my fortress site during the embark?
Checking "Don't Display Visitors/Guests" may help in fortress mode. But it cannot work in embark because the fortress does not exists yet.
I am a minimalist, so I would go for the one flag that sets them apart. For example flags2.no_notify, which is set only for the proper dwarves (red one in my example), and apparently in your case too. Alternatively, go for non-historical figures. Only historical figures and seven created dwarves (who are destined to be historical, but aren't quite there yet during embark) are visible in the lists before site is loaded.
The bad dwarves are took from the world gen and are present from the beginning of map selection. When you run Dwarf Therapist then, then only bad (historical) dwarves of your civ will be shown. The seven proper dwarves are created only after you press embark and can choose "Play now" or "Prepare carefully". They are added at the end of list. They have different set of flags, but this set is valid only for the duration of embark preparation (and it is possible than some of the flags have other meaning than during proper play, or are set to default, temporary values). They are heavily modified after embark, for example historical_figure flags are both set.
As for active dwarves the map must be loaded, yes. All critters coming to the map are moved to the active list but remain (or have set) flags1.inactive (which used to be called flags1.dead) for a short while (or a much longer while, if the site they want to come in is occupied, I use this in my certain script to identify stuck migrants and coming invaders), and critters who left the map are on active list for a very short period, being flags1.inactive, before being purged. So I would go for the flags, but care about them only if the active site is not loaded yet (implying DR is used during embark stage). I didn't even know that Dwarf Therapist can be used during embark...