Replaced contains with contains_in_order for Lexicographic order.