I fly LHR-MAD regularly and there are occasions where there are IB and BA departures within minutes of each other, each with a codeshare number for the other airline. It can get a little confusing if you've had one vino too many.
Of course, unless the price difference is significant, one should always fly on BA metal even though I often book through IB.com