Not sure if this is tech support or ideas and suggestions, but:
When placing flak, the firing arc is shown from the pivot point. However, the actual bullet comes out of each flak barrel, not the pivot point. This can cause situations where flak thinks it can hit an enemy target, but instead hits it's own ship and ends up dealing friendly fire.
Also, does hold fire do anything for flak? It seems to still target both ships and bullets even when set to hold fire, regardless of the attack/defend setting.