Must be in sorted order.