Test cases with @id and @context reordering

Related to #250