No, the proper script should be that she flirts if you are romancing them both. In the context of an established consensual relationship between all three of them.
Exactly. If they want to keep her as a poly option for whatever reason, the least they could do is have it be down to the player to trigger it. I'm fine with her flirting with Karlach in act 1 because not only do you have nothing with her there yet, she tends to even dislike you initially. But once you get the ball rolling on the relationship and go the 'good' Shadowheart route, she shouldn't be flirting anymore, unless Tav (you) are doing it as well. But as it stands, it's quite possible it in fact only happens during the 'good' Shadowheart route.