Suppose four units are engaged in melee in a rough line like so:
1A2B.
Unit 1 is in contact with models in unit A, but not 2 or B. Unit 2 is in contact with A & B but not unit 1. Unit A is contact with 1 and 2, Unit B is in contact with only unit 2. 1&2 are allies, as are units A&B.
Can units 1 and B attack each other with melee attacks? They're all in the same melee, but they aren't in base contact.
A Theory for Yes:
Rules Reference says "Minis that are not in base contact with an enemy mini can still contribute to a melee attack if the unit to which that mini belongs is in a melee." We're all in a melee, so we imagine a single large scrum where everyone is attacking everyone.
A Theory for No:
Rules Reference says "When two miniatures from opposing players’ units are in base contact, those units are in a melee." 1 and B aren't in contact, so no melee. What we have isn't a melee, but rather four different melees. 1A is a melee, 1A2 is a different melee, A2B is a different melee still, and finally 2B is our last melee.
I thought yes at the time and we diced it off in game, but now I think more on it I think the no theory might be right.