I was looking at the firing into melee friendly fire sidebar. It all makes sense that if your attack misses because the defender dodges it, you risk hitting your friend. However, it also means that the more bullets fired, the less chance that the defender will dodge it, so the only "safe" thing to do is full auto 10 bullets.
Full auto + defender in melee penalties sums up to -12, which is enough to completely negate most defense pools. Since the defender is hit, the friend in melee don't need to take a defense test, so this is by and far the safest option unless the defender has a really high defense pool. Missing outright means none of them are threatened, despite the number of rounds fired.
To avoid this silliness, a simple fix:
1. If you fire semi-auto burst or short burst into melee, the friend has to defend against half the number of hits even if the defender failed his defense test.
2. If you fire long burst or full auto burst into melee, both defender and friend have to defend against the same attack.
Or, to put it in other words: If you absolutely have to shoot an enemy that close to your friend, make sure to aim well and fire once.