What makes it "friendly fire"? Because the cannon is one that on your boat, or because the person that lit the powder is a member of your crew?
What if a cannon on your boat is fired by a member of another crew? What if it is loaded and aimed by a member of your crew, but fired by someone else? What if a member of your crew uses a cannon on another ship?
Are you safe from a cannon blast, fired from a land-based cannon, by a crewmate; but not one fired from the same cannon by a skelly or someone from another crew?
Considering these factors, and the destructive power of cannon fire, it really is absurd that you could be immune to some cannon blasts, but not others.