The named plaintiffs in this class action, Milner and Johnson, applied for and were granted social security disability benefits because of their insanity. Later the two were prosecuted in an Illinois state court for murders which they had committed, were acquitted by reason of their insanity, and were ordered confined indefinitely (up to the limit of the maximum sentences they might have received had they been convicted, 730 ILCS 5/5 — 2—4) in an Illinois state mental hospital, where they remain today, supported at the expense of the Illinois taxpayer. (If they are ever released, they will get a bill, 405 ILCS 5/5-105, but in all likelihood won’t be able to pay it — and they may never be released.) They continued to receive social security disability benefits until 1995, when, pursuant to a statute passed the previous year, the Commissioner of Social Security suspended the payment of benefits until the plaintiffs are released from their confinement, if ever. The statute directs the suspension of social security benefits payable to any individual who is “confined by court order in an institution at public expense” pursuant to “a verdict or finding that the individual is not guilty of [an offense punishable by imprisonment for more than one year] by reason of insanity.” 42 U.S.C. § 402(x)(l)(A)(ii).(II).
The plaintiff class consists of all persons in Illinois whose benefits have been suspended under the authority of this provision. Their claim, which the district court rejected on the pleadings, is that it is a denial of- the equal protection of the laws, and so a violation of the due process clause of the Fifth Amendment, see, e.g., Bolling v. Sharpe, 347 U.S. 497, 499, 74 S.Ct. 693, 98 L.Ed. 884 (1954); Adarand Constructors, Inc. v. Pena, 515 U.S. 200, 217, 115 S.Ct. 2097, 132 L.Ed.2d 158 (1995); Tucker v. U.S. Dept. of Commerce, 958 F.2d 1411, 1413 (7th Cir.1992), to cut off social security benefits to persons acquitted by reason of insanity while allowing other insane persons confined at public expense, often in the very-same institutions, to continue receiving them. The plaintiffs argue that the only difference between persons who are civilly committed to mental institutions at public expense and persons such as themselves who aré committed to those same institutions after being acquitted of criminal charges because of insanity is that the latter class committed criminal acts for which, however, they are not punishable, as demonstrated by their acquittal. And it is a difference unrelated, the plaintiffs further argue, to any need or lack of need for social security benefits while confined at public expense. ■
If the test is whether the difference in treatment is rational, the claim clearly fails; In 1980 Congress had amended the Social Security Act to direct the suspension of benefits for persons confined pursuant to a criminal conviction. 42 U.S.C. - § 423(f). This would by implication have included persons found guilty but insane or guilty but mentally ill, since either is a form of conviction. See, e.g., 720 ILCS 5/6-2(c); People v. Crews, 122 Ill.2d 266, 119 Ill.Dec. 308, 522 N.E.2d 1167, 1173 (1988); Ira Mickenberg, “A Pleasant Surprise: The Guilty But Mentally 111 Verdict Has Both Succeeded in Its Own Right and Successfully Preserved the Traditional Role of the Insanity Defense,” 55 U. Cinc. L.Rev. 943, 988 (1987). It is true that Congress didn’t make this implication explicit until the 1994 amendments. See 42 U.S.C. § 402(x)(l)(A)(ii)(I). But that is doubtless because the “guilty but mentally ill” form of verdict was new in 1980, see Barbara A. Weiner, “Mental Disability and the Criminal Law,” in The Mentally Disabled and the Law 693, 715 (Samuel Jan -Brakel, John Parry & Barbara A. Weiner eds., 3d ed.1985), rather than because Congress had meant to exclude defendants found guilty under that form from the suspension of benefits to convicted criminals.
The difference between being found guilty but insane or guilty but mentally ill, on the one hand, and being acquitted (or, the equivalent, found not guilty) because of insanity, *814on the other hand, is little if anything more than a possible difference in the place of confinement — a prison with psychiatric facilities versus an insane asylum. See Weiner, supra, at 714-16. In either case, the trier of fact has found that the defendant committed the criminal acts charged but because of insanity lacked the mental state ordinarily required to make a person criminally liable. See 720 ILCS 5/6 — 2(e); Jones v. United States, 463 U.S. 354, 363, 103 S.Ct. 3043, 77 L.Ed.2d 694 (1983); Morgan v. Israel, 735 F.2d 1033, 1034 (7th Cir.1984). The disability benefits of the guilty but insane having been suspended, it was illogical to allow the acquitted but insane, also maintained at public expense, and often under identical conditions in the same or similar facilities, to continue to receive benefits. The 1994 amendment eliminated this anomaly or loophole. (The legislative history uses both terms. E.g., 143 Cong. Rec. H1917-04 (Apr. 29, 1997). Wilkins v. Callahan, 127 F.3d 1260, 1262-63 (10th Cir.1997).)
By doing this, however, Congress created another anomaly — the differential treatment of the civilly and the criminally committed. But this sort of thing is inevitable whenever Congress moves step by step to correct some inequity, in this case the payment of benefits to people who don’t need them because they are being maintained at the expense of the taxpayer, who is also the source of the benefits and doesn’t want to pay twice over. Legislatures are permitted to correct a problem incrementally even though by doing so they create arbitrary distinctions until correction is complete. E.g., Bowen v. Owens, 476 U.S. 340, 347, 106 S.Ct. 1881, 90 L.Ed.2d 316 (1986); Califano v. Jobst, 434 U.S. 47, 57-58, 98 S.Ct. 95, 54 L.Ed.2d 228 (1977); Williamson v. Lee Optical of Oklahoma, Inc., 348 U.S. 483, 489, 75 S.Ct. 461, 99 L.Ed. 563 (1955); Smith v. Shalala, 5 F.3d 235, 240 (7th Cir.1993). It could not be otherwise. The conditions under which legislators operate, conditions that include interest-group pressures and budgetary limitations, often make it impossible for a legislature to solve problems at wholesale rather than retail.
What is more, the civilly and' the criminally committed are not identically situated. To begin with, the latter are likely to be confined for a longer time. E.g., Weiner, supra, at 726 n. 395; David B. Wexler, “Redefining the Insanity Problem,” 53 Geo. Wash. L.Rev. 528, 536, 538 (1985). The longer they are confined, the less likely they are to need an accumulation of disability benefits to finance their reentry into free society. Many of the criminally insane are unlikely ever to be permitted reentry — perhaps including the murderers who are the class representatives in this case.
Against this the plaintiffs argue that Congress violated the Constitution at an earlier stage, when it suspended benefits for convicted criminals; the -exclusion of persons acquitted but confined by reason of insanity merely aggravated the original denial of equal protection. Criminals whether sane or insane are, in the plaintiffs’ view, identically situated to insane people civilly committed, since all are being maintained at public expense and so do not need social security benefits until they are released. But this overlooks among other things the important moral difference between criminals and noncriminals, and so implies that giving civilly committed insane people who have committed no criminal acts more comfortable quarters than sane criminals is a denial of equal protection unless a deterrent or other practical or functional purpose can be assigned to the difference in treatment. Legislatures are permitted to legislate with regard to morality, e.g., Bowers v. Hardwick, 478 U.S. 186, 196, 106 S.Ct. 2841, 92 L.Ed.2d 140 (1986), rather than confined to preventing demonstrable harms (John Stuart Mill’s “other-regarding” acts). How else to explain prohibitions against gambling, prostitution, public nudity and masturbation, fornication, sodomy, the sale of pornography, sexual intercourse with animals, desecration of corpses, and a variety of other “morals” offenses? A traditional purpose of criminal punishment is to express moral condemnation of the criminal’s acts. E.g., United States v. Bass, 404 U.S. 336, 348, 92 S.Ct. 515, 30 L.Ed.2d 488 (1971); Gregg v. Georgia, 428 U.S. 153, 183, 96 S.Ct. 2909, 49 L.Ed.2d 859 (1976) (plurality opinion). It follows that within limits mainly defined by the cruel and unusual punishments clause of the Eighth Amend*815ment, legislatures are permitted to treat criminals worse than they treat the law-abiding without having to establish a functional justification for the' difference in treatment. So it is no surprise that equal protection challenges to the suspension of social security benefits to imprisoned criminals have been uniformly rebuffed. E.g., Davis v. Bowen, 825 F.2d 799 (4th Cir.1987); Zipkin v. Heckler, 790 F.2d 16 (2d Cir.1986) (per curiam); Jensen v. Heckler, 766 F.2d 383 (8th Cir.1985).
Another justification for the difference in treatment of which the plaintiffs complain is the moral difference between insane perpetrators of criminal acts and the law-abiding insane, David Cohn, “Offensive Use of the Insanity Defense: Imposing the Insanity Defense Over the Defendant’s Objection,” 15 Hastings Const’l L.Q. 295, 310 (1988), whether the former are acquitted of their crimes by reason of their insanity or instead are adjudged guilty but insane. It is a difference that philosophers have discussed under the rubric of “moral luck.” See, e.g., Bernard Williams, “Moral Luck,” in his book Moral Luck: Philosophical Papers 1973-1980 20 (1081); also Williams,. “Moral Luck: A Postscript,” in his book Making Sense of Humanity, and Other Philosophical Papers 1982-1993 241 (1995); Thomas Nagel, “Moral Luck,” in Nagel, Mortal Questions 24 (1979). The courts are beginning to use the term as well. See United States v. Martinez, 16 F.3d 202, 205-06 (7th Cir.1994); United States v. Tham, 118 F.3d 1501, 1507 (11th Cir.1997); United States v. Smith, 27 F.3d 649, 653 (D.C.Cir.1994). Take two cases. In one a reckless driver narrowly misses hitting a child; in the other, a nb more reckless driver hits a child. As far as mental state is concerned, both are equally blameworthy; but the second driver will be punished much more heavily. See Payne v. Tennessee, 501 U.S. 808, 819, 111 S.Ct. 2597, 115 L.Ed.2d 720 (1991); Stephen P. Garvey, “ ‘As the Gentle Rain From Heaven’: Mercy in Capital Sentencing,” 81 Cornell L.Rev. 989, 1048 nn. 120-21 (1996). The reason is that the community attaches moral significance to consequences as well as to states of mind.
And this is true when the state of mind is what we call insane. The insane person who never harms anyone is regarded differently from the no more insane person who kills because of his insanity. The insane killer may be acquitted, but he is regarded as morally less worthy than the insane nonkil-ler. Cohn, supra. The principal reason for the formula “guilty but insane,” which ás we noted earlier is a recent addition to the forms of criminal judgment, is to enable jurors to give vent to their deeply rooted feelings that people who commit serious crimes by reason of insanity are not morally innocent and ought therefore not be acquitted. Weiner, supra, at 714 and n. 264.
The moral difference between the criminal insane and the noncriminal insane, though a difference based on consequences rather than state of mind, reflects a moral intuition that is deeply rooted in the traditions of the American people (and probably every other people as well). And being so rooted it furnishes a rational basis for Congress’s being less generous toward insane criminals than toward insane noncriminals by denying the members of the former group an entitlement to public financial support above and beyond the expense of maintaining them.
We grant that not every moralist thinks that moral luck should be a component of morality, see, e.g., Michael S. Moore, “The Independent Moral Significance of Wrongdoing,” 1994 J. Contemp. Leg. Issiies 237 (1994), and that not every judge thinks it should affect criminal punishment. See, e.g., Lockett v. Ohio, 438 U.S. 586, 620, 98 S.Ct. 2954, 57 L.Ed.2d 973 (1978) (concurring opinion). But legislatures are not limited to legislating the moral views that command the unanimous agreement of the community; otherwise they could- not criminalize gambling or fornication.
These points are decisive against the plaintiffs’ position if the proper standard is whether the challenged legislation has a ra^tional basis. And-the orthodox rule is that rational basis is the proper standard for deciding equal protection cases unless the plaintiff falls within a handful of special classes — racial minorities for example, or aliens, or persons born out of wedlock, -or *816women, all being classes of persons who are believed to be especially vulnerable to discriminatory legislation because they are or once were marginalized by the political process. E.g., Lyng v. Castillo, 477 U.S. 635, 638, 106 S.Ct. 2727, 91 L.Ed.2d 527 (1986); Califano v. Jobst, supra, 434 U.S. at 53-54, 98 S.Ct. 95. The Supreme Court has not decided whether the insane are one of those specially protected classes, see Heller v. Doe by Doe, 509 U.S. 312, 321, 113 S.Ct. 2637, 125 L.Ed.2d 257 (1993); Washington v. Harper, 494 U.S. 210, 225, 110 S.Ct. 1028, 108 L.Ed.2d 178 (1990); Schweiker v. Wilson, 450 U.S. 221, 233-35, 101 S.Ct. 1074, 67 L.Ed.2d 186 (1981), but several cases imply or hint that they are not. See Heller v. Doe by Doe, supra, 509 U.S. at 321, 113 S.Ct. 2637; City of Cleburne v. Cleburne Living Center, 473 U.S. 432, 466, 105 S.Ct. 3249, 87 L.Ed.2d 313 (1985); Jones v. United States, supra, 463 U.S. at 363, 103 S.Ct. 3043; Jackson v. Indiana, 406 U.S. 715, 736-37, 92 S.Ct. 1845, 32 L.Ed.2d 435 (1972); Baxstrom v. Herold, 383 U.S. 107, 111-15, 86 S.Ct. 760, 15 L.Ed.2d 620 (1966). And that is the uniform view of the courts of appeals. See, e.g., Raimondo v. Belletire, 789 F.2d 492, 497 (7th Cir.1986); Fetterusso v. New York, 898 F.2d 322, 325 (2d Cir.1990); Buthy v. Commissioner of Office of Mental Health, 818 F.2d 1046, 1049-50 (2d Cir.1987); Glatz v. Kort, 807 F.2d 1514, 1522-23 (10th Cir.1986); Benham v. Ledbetter, 785 F.2d 1480, 1485 and n. 4, 1488 (11th Cir.1986); United States v. Cohen, 733 F.2d 128, 134 (D.C.Cir.1984) (en banc). A number of the cases that we have cited, including the Supreme Court’s decision in Jones and our decision in Raimondo, upheld differences in treatment between persons found not guilty by reason of insanity and civilly committed persons.
Some judges have thought the difference between rational basis review for nonmembers of the specially protected classes and a more searching review for members too stark and unnuanced. These judges have advocated a “sliding scale” approach by which the more marginal the plaintiffs group the more justification the government must show for discriminating against it. See, e.g., City of Cleburne v. Cleburne Living Center, supra, 473 U.S. at 451-55, 105 S.Ct. 3249 (concurring, opinion); id. at 458, 105 S.Ct. 3249 (concurring and dissenting opinion). Under such an approach, the equal protection claims of the insane might get more consideration than the equal protection claims of railroads complaining about discriminatory property taxes. A Supreme Court majority, however, has never accepted this approach. See id. at 442, 105 S.Ct. 3249; see generally Montgomery v. Carr, 101 F.3d 1117, 1122-24 (6th Cir.1996).
Or at least has never purported to accept this approach; for the plaintiffs point us to cases, notably City of Cleburne v. Cleburne Living Center, supra, and Romer v. Evans, 517 U.S. 620, 116 S.Ct. 1620, 134 L.Ed.2d 855 (1996), in which the Supreme Court has seemed to give plaintiffs not within one of the specially protected classes the benefit of a more searching review (the plaintiffs call this “active rational basis review”) than a railroad or other purely commercial equal protection claimant would be thought entitled to. See also, e.g., U.S. Dept. of Agriculture v. Moreno, 413 U.S. 528, 533-35, 93 S.Ct. 2821, 37 L.Ed.2d 782 (1973); Zobel v. Williams, 457 U.S. 55, 102 S.Ct. 2309, 72 L.Ed.2d 672 (1982); Plyler v. Doe, 457 U.S. 202, 102 S.Ct. 2382, 72 L.Ed.2d 786 (1982); Caren G. Dubnoff, “Romer v. Evans: A Legal and Political Analysis,” 15 Law & Inequality 275, 304 (1997); Cass R. Sunstein, “Foreword: Leaving Things Undecided,” 110 Harv. L.Rev. 4, 77-78 (1996). In City of Cleburne, the plaintiffs were retarded people, and in Romer they were homosexuals. Our plaintiffs argue that in both cases the Court relied on evidence of the state’s “animus” against the groups claiming a denial of equal protection to shift to the state a burden of justification that it could not carry. And they contend that the legislative history of the 1994 amendment to the Social Security Act, a history that includes references by members of Congress to the “heinous crimes” and “terrible acts” of persons acquitted by reason of insanity (acts such as the murders by the plaintiffs in the present case), 140 Cong. Rec. E913-02 (May 10, 1944); H11014-01 (Oct. 6, 1994), demonstrates animus toward the class of persons acquitted by reason of insanity, and that the justifications offered by the *817government are too weak to offset that animus. In effect they are claiming that the only reason the amendment was passed was that Congress hates people who are acquitted by reason of insanity.
We consider this an overreading of the City of Cleburne and Romer cases, even if, contrary to settled law illustrated by such cases as Flemming v. Nestor, 363 U.S. 603, 619, 80 S.Ct. 1367, 4 L.Ed.2d 1435 (1960), and Inmates of Suffolk County Jail v. Rouse, 129 F.3d 649, 660-61 (1st Cir.1997), scattered comments of a vindictive nature in a legislative history prove animus to a degree sufficient to overcome the presumption (a principle of comity) that legislation is not viciously motivated. Heller v. Doe by Doe, supra, 509 U.S. at 321, 113 S.Ct. 2637. If a law is challenged as a denial of equal protection, and all that the government can come up with in defense of the law is that the people who are hurt by it happen to be irrationally hated or irrationally feared by a majority of voters, it is difficult to argue that the law is rational if “rational” in this setting is to mean anything more than democratic preference. And it must mean something more if the concept of equal protection is to operate, in accordance with its modern interpretations, as a check on majoritarianism.
This at any rate seems to be the basis of the City of Cleburne and Romer cases. In the first, a zoning ordinance discriminated against housing for the retarded, and there was no.evidence of a rational basis for the discrimination; the only basis, the Court found, was an irrational fear of a harmless group of people. See 473 U.S. at 448-50, 105 S.Ct. 3249. In Romer a state constitutional provision discriminated against homosexuals. Although it might have been possible to give reasons for such discrimination (an issue on which we take no position), such as fear of AIDS, or of recruitment, seduction, or abuse of vulnerable teenagers, no such reasons were argued to the Court; as presented to the Court it was another case of public discrimination against harmless people. Moreover, the Court was concerned with the breadth of the challenged provision, which it thought denied homosexuals “protection across the board.” 116 S.Ct. at 1627-28. Here the plaintiffs are being deprived of money of which they could make little use and which they certainly don’t “need,” since they are subsisting at the state’s expense.
The reasoning of Cleburne and Romer does not reach as far as the present case, and we shall leave it to the Supreme Court to draw out any broader implications of their texts. Murderers are not harmless people, even if they committed their murders under the influence of insanity. They are dangerous, and rationally feared; and the moral disapprobation of them is based on a moral intuition (what we have called “moral luck”) that cannot be dismissed as invidious or irrational. To treat these people more harshly— only slightly more harshly, as we have just noted — than people who are insane but harmless, like the retarded but harmless plaintiffs in the Cleburne case, cannot be thought irrational under either the orthodox standard of rational review or the more adventurous standard that might be thought implied by that case and by Romer.
Affirmed.