EMI: Sort actors by id if distance is equal.