Fix a fragile test by ordering a a comparison