your right this is by far the most annoying bug in the game for me.
shield heal, hull heal, tac team anything that will transfer to a team mate during a stf transfers automatic. i was told several players wrote a support ticket, they know about it, they just care more about the mail, that wasnt broken....
1. In game, go to Options.
2. Select Controls tab
3. Make sure Region is set to Space
4. Set 'assist target on attack' to off.
Notice the tooltip for the 'assist target on attack' option how it says if you heal/buff your target and its an enemy it will cause you to heal your targets target. I turned this off and now my heals and buffs only hit me unless I target an ally first. Should work for you too.