For the Karlach vs Anders, it depends how you do it, what your character knows in-game and the conversation you had with both side before killing either.
I believe i described that quite thoroughly. O_o
They are people who broke their oath by attacking/killing Anders after accepting both quests and people who haven't.
As for killing Karlach, I'm wondering if possible companions don't have any flags since you can kill non hostile Lae'zel without oath breaking (at least with of the Ancient, I haven't tried Devotion).