Fix test that flakes depending on order