I have found that flak turrets actually work far far better when combined with gravity turrets. I had a few vampires (3-4) attacking the command station of one of my back water systems, so I sent some engineers, and insta-built a set of five flak turrets. Around 30 seconds later the vampires were still at pretty high health, and showing no signs of dying before the command station. So I thought "well, it looks like the flak is missing the vampires, lets slow them down" so I built a grav turret, and Presto! The vampires were all dead in around 5 seconds. This happened a few other times too, so I'm pretty sure it's consistent.
While grav turrets effecting the hit effectiveness of flak turrets might be a bug, it is currently happening, so I would just add in grav turrets with flak, and you will have no problems with melee ships.