Use lowest z on a tiebreaker (you'll see that edge first).