Here's something I've noticed recently, especially on my own missions where I KNOW it's not working as I wanted it to:
In some Foundry missions, the Foundry will "choose" one of your BOffs and place him/her in every pop-up dialog box in the mission that involves a BOff. It gets really weird when you've designed a conversation between you and several of your BOffs in a branching dialog set-up, and your one BOff is making all the various arguements himself!
It DOES seem to tell the difference between Away Team and Ship BOffs. It also seems to prefer Engineer BOffs over Tac and Sci.
Quick questions; is this in a mission that's published or while previewing?
If in the foundry is this when just previewing the dialog or viewing it on a map?
How many boffs do you have?
I'm not having a problem myself, or within my missions, but what I know happens if you select boffs from say Science officer (ship) while on the ground, and your ship does not have a science officer on it, it will default to a boff still on board of any discipline. That's if in your dialogs instead of Officer (Away) for ground you are using (ship) or vice-versa for a space map.
The other options I see this happening for all involve not having enough doffs on your tester character, but just to be sure for your missions check to see your dialogs are set to use the right set of officers for dialogs.
What I found was that, although I had 2 Eng, 1 Sci, and 1 Tac BOff with me on the Away Team, my first Eng was coming up for EVERY Away Team pop-up. I also had the plenty of BOffs on my ship, and the ship Eng came up for EVERY ship pop-up.
On other people's Foundry missions, it's not as noticable (although odd), but on my own, when I know who's SUPPOSED to show up, it gets very frustrating. Especially since my current mission is so dialog-heavy.