There's a x3 draw at 7 points between these teams, so, only conut the goal average, goals obtained/recived between the matches played between these 3 teams. If you do not count in these 3 teams the points, and goals obtained/recived against the 1st, the ranking will be ok.
The system is based in the real rules of the Champions League.