Get rid of "comparisons like X<=Y<=Z do not have their mathematical meaning" gcc warning, based on the patch from Kim Barrett.