so add a final 'hold' waypoint to each and every group, create a switch trigger with the conditions described above, and synchronise it to the second-last waypoint in each group.
that way when there are only 2-3 loons in a group, they 'flee' to the hold waypoint.