Tests + fixes for criterion match ordering.