This fixes a problem with pattern ranges; and corrects a situation in res_features...