ranges: parse the ranges list correctly if it only includes "max"