OPINION OF THE COURT
ADAMS, Acting Chief Judge.
This appeal from a denial of disability benefits focuses primarily on the importance of a claimant’s age in the determination whether he can perform substantial gainful activity and therefore is not disabled within the meaning of the Social Security Act. The Social Security Administration (SSA) employs guidelines on disability determinations that consider age as well as other factors; the agency classifies persons between the ages of 45 and 64 in five-year categories. Because the age of the claimant in this proceeding was close to the border between two categories, and because SSA did not consider its own regulation that provides for flexibility in such a situation, the matter will be remanded for further proceedings.
I.
The claimant, Robert H. Kane, was born on February 17, 1925, and his insured status expired on December 31, 1979, 48 days before his 55th birthday. He maintains that he was disabled as of 1979, largely because of shrapnel wounds suffered during World War II. In 1979, he complained of weakness and pain in the neck and shoulder, degenerative arthritis of the cervical spine, other musculoskeletal impairments, and cardiovascular disease.
Kane’s original application for Title II benefits was denied in 1976. He filed a second application in 1982 that is at issue in this appeal. At his hearing before an Administrative Law Judge (AU) on September 26, 1983, Kane testified that he last worked at his job as a furniture salesman in January 1975. He has a 10th grade education. He wears a sling on his left arm, and claims that a tremor in his right hand makes writing difficult. In his testimony, Kane reported pain in his legs, and that as a result he cannot walk more than two blocks without resting. These various ailments cause him to sleep fitfully, he asserts, and prevent him from sitting for long periods of time. He declared that he does only minor household chores, can lift no more than ten pounds, but can drive a car.
The AU ruled that Kane was not disabled within the meaning of the Act, and denied the application for benefits. The Appeals Council affirmed. Kane then challenged the final ruling of the Secretary in a complaint filed in district court. The district court entered summary judgment for the Secretary, and Kane brought this appeal.
II.
Kane did not seek judicial review of the first administrative decision, which became final on September 30, 1976, and SSA argues that because Kane has not alleged any different facts in his latest application the prior decision is res judicata.
However, SSA did not raise this argument either in the administrative proceedings or in the district court. Res judicata is an affirmative defense, Davis v. United States Steel Supply, 688 F.2d 166, 170 (3d Cir.1982) (in banc), cert. denied, 460 U.S. 1014, 103 S.Ct. 1256, 75 L.Ed.2d 484 (1983); Fed.R.Civ.Proc. § 8(c), and such a defense may not be presented on appeal if not pleaded in the district court. 18 C. Wright, A. Miller & E. Cooper, Federal Practice & Procedure, Jurisdiction § 4405, at 34-35 (1981); Crowder v. Lash, 687 F.2d 996, 1008 (7th Cir.1982); Exxon Corp. v. Texas Motor Exchange of Houston, 628 F.2d 500, 507 n. 3 (5th Cir.1980).
Even if the issue had been properly presented to this Court, res judicata is not appropriate in this case. Kane’s circumstances changed between 1976 and 1979; most notably, he grew older at a time in life when age plays an increasingly significant role in disability determinations. In fact, the AU in 1983, who also did not address res judicata, disagreed with the earlier decision. He determined, in contrast to the 1976 ruling, that Kane could not return to his former job.
Moreover, this Court held recently that where the administrative process does not address an earlier decision, but instead reviews the entire record in the new proceeding and reaches a decision on the merits, the agency has effectively reopened the prior claims and waived application of res judicata. Purter v. Heckler, 771 F.2d 682, 695 (3d Cir.1985). Res judicata therefore does not constitute a bar to Kane’s claims.
III.
A.
The AU found initially that in 1979 Kane suffered from a severe musculoskeletal impairment and could not return to his former job as a furniture salesman. These findings established the claimant’s prima facie case of disability, and shifted to the Secretary the burden of demonstrating that Kane is unable, “considering his age, education, and work experience, [to] engage in any other kind of substantial gainful work which exists in the national economy____” 42 U.S.C. § 423(d)(2)(A) (1982); Rossi v. Califano, 602 F.2d 55, 58 (3d Cir.1979).
To perform the inquiry into residual work abilities that is required by the statute, the Secretary has promulgated medical-vocational guidelines. See 20 C.F.R., Pt. 404, Subpt. P, Apps. 1-2 (1985). These guidelines direct that certain impairments are so severe that claimants who suffer from them are considered disabled. See id. at App. 1. If these strict requirements are not met, the factfinder must apply the rules in Appendix 2, known as “the grids.” These rules take into consideration the claimant’s physical abilities, age, education, and work experience, and direct a finding of disability or lack of disability depending on the combination of these factors.
The AU, as required, applied the grids in Kane’s case. He found that Kane remains capable of performing “light work,” has a limited education, and was 54 years old at the time he last met the earnings requirements. Rule 202.10 requires a finding of not disabled for such a claimant, whether or not his prior work skills are transferable.
B.
In applying the grids and noting Kane’s age as 54, despite the fact that Kane’s insured status expired only 48 days before his 55th birthday, the AU failed to consider 20 C.F.R. § 404.1563(a) (1985). That regulation lists the age categories used on the grids, but adds: “we will not apply these age categories mechanically in a borderline situation.” Because the AU did not address this relevant regulation; and because proper application of the regulation may change the result in this case, the matter must be remanded to the Secretary for further consideration. See Coulter v. Weinberger, 527 F.2d 224, 230 (3d Cir.1975).
The choice of an age category had a decisive impact on the disability determination. If Kane were placed in the “advanced age” category (55 and over), and assuming that the light work and limited education determinations are correct, Kane could be found disabled if his skills were not transferable. Rule 202.02. The AU made no finding on transferability of skills, because of his determination that Kane belonged in the lower age category.
In a brief opinion, the district court held that § 404.1563(a) did not apply here. It stated: “we believe a borderline situation refers to a case where all of the factors ... considered together, do not compel a clear cut finding concerning disability. This is not such a case.” Even if this interpretation of the regulation were correct, there is not substantial evidence in the record justifying the district court’s conclusion. Notably, no factfinder has determined the transferability of Kane’s skills, and thus it is not known whether this is a “clear cut” case or not.
More important, the district court’s interpretation contravenes the plain language of the regulation, the views of its drafters, and the holdings of the several courts to consider the meaning of the provision. In its comments accompanying promulgation of a predecessor rule to § 404.1563, SSA wrote: “SSA practice over the years, in fact, has been in agreement with the comment that the passage of a few days or months before the attainment of a certain age should not preclude a favorable disability determination.” 43 Fed.Reg. 55349, 55359 (1978). SSA reaffirmed this position in adopting the decision in Fogg v. Schweiker, 673 F.2d 1296 (10th Cir.1981); see SSR 82-46C, at 217 (cum. ed. 1982).
The few courts to address a mechanical application of the age categories in a borderline situation have remanded the cases to SSA for more individualized determinations. Chester v. Heckler, 610 F.Supp. 533, 534-35 (S.D.Fla.1985) (claimant’s 50th birthday was 30 days after expiration of insured status); Ford v. Heckler, 572 F.Supp. 992, 994 (E.D.N.C.1983) (claimant was two months away from 45th birthday when AU decided and 15 days shy when Appeals Council ruled); Hilliard v. Schweiker, 563 F.Supp. 99, 101-02 (D.Mont.1983) (ALJ ruled 88 days before claimant’s 55th birthday).
The plain meaning of § 404.1563(a) is that where the claimant’s age falls within, in the Secretary’s words, a “few months” of the starting date of an age category the grids should not be employed mechanically. There is an assumption inherent in the grids that persons within those categories have certain capabilities, but in a “borderline situation” this assumption becomes unreliable and a more individualized determination is necessary. “[I]t must be kept in mind that the grids do not govern — and indeed were not intended to govern — all disability cases.” Santise v. Schweiker, 676 F.2d 925, 934 (3d Cir.1982) (emphasis in original), cert. denied, 461 U.S. 911, 103 S.Ct. 1889, 77 L.E.2d 280 (1983).
In Heckler v. Campbell, 461 U.S. 458, 103 S.Ct. 1952, 76 L.Ed.2d 66 (1983), the Supreme Court upheld the medical-vocational guidelines against an assertion that the rules were arbitrary and capricious, and inconsistent with the Act’s assurance of individual consideration. But in so doing, it relied on the guarantee that “[i]f an individual’s capabilities are not described accurately by a rule, the regulations make clear that the individual’s particular limitations must be considered.” 461 U.S. at 462 n. 5, 103 S.Ct. at 1955 n. 5; see also id. at 467, 103 S.Ct. at 1957.
Additionally, the regulations declare that the administrative law judge will not apply the age categories “mechanically in a borderline situation,” 20 CFR § 404.-1563(a) (1982), and recognize that some claimants may possess limitations that are not factored into the guidelines, see app. 2, § 200.00(e). Thus, the regulations provide that the rules will be applied only when they describe a claimant’s abilities and limitations accurately.
461 U.S. at 462 n. 5, 103 S.Ct. at 1955 n. 5.
In sum, courts recognize that the grids provide useful standards and allow for consistent, less complex decision-making. But judicial approval of these standards is premised on the assurance that SSA will not employ them to produce arbitrary results in individual cases. Where a Procrustean application of the grids results in a case that, but for the passage of a few days, would be decided differently, such an application would appear to be inappropriate. Section 404.1563(a) therefore serves an important purpose in the regulatory scheme, and AUs should adhere to its clear language.
The proper course on remand is informed by the Secretary’s own regulations. In her introduction to the grids, she declares:
[W]e do not apply these rules if one of the findings of fact about the person’s vocational factors and residual functional capacity is not the same as the corresponding criterion of a rule. In these instances, we give full consideration to all relevant facts in accordance with the definitions and discussions under vocational considerations.
20 C.F.R. § 404.1569 (1985). According to the regulatory description of the age factor, the important difference between those of advanced age and those closely approaching advanced age is that the age of persons in the former category “significantly affects a person’s ability to do substantial gainful activity,” while the age of those in the latter category merely “seriously affect[s their] ability to adjust to a significant number of jobs in the national economy.” Id. at § 404.1563(c), (d). The AU must consider which of these rules better described Kane’s abilities on December 31, 1979, given the claimant’s actual age and circumstances on that date. The AU may then use the grids primarily as a guide in making the disability determination. Id. at Pt. 404, Subpt. P, App. 2, § 200.00(d).
C.
Kane raises several other issues on this appeal.
He argues that the AU erred in deciding that he was capable of “light work,” which requires a “good deal” of walking and standing, pushing and pulling of arm and leg controls, and lifting no more than 20 pounds, with frequent lifting of 10 pounds. 20 C.F.R. § 404.1567(b) (1985). If Kane’s testimony is credited, he is incapable of such work. His treating physician, Dr. Louis Katz, concurs; he wrote on October 2, 1975 that Kane “is only capable of doing light work and limited to several hours a day due to his musculoskeletal problems.” In a letter dated November 16, 1982, Dr. Katz said Kane’s condition was unchanged: “It is my opinion that this patient is still unemployable and will remain unemployable in the future.” Id. at 247.
The AU determined that Kane could do light work, stating without explanation that he relied particularly on a physical examination performed on December 14, 1981. But this examination was a onetime consultation that preceded Kane’s admission to the hospital on that date for angiograms and a subsequent operation during which a right carotid endarterectomy was performed. Notably, the doctor did not express any view on how Kane’s musculoskeletal impairments affected his work ability. Such a record is not substantial evidence of no disability when presented against the clear opinion of a treating physician. Rossi v. Califano, 602 F.2d 55, 58 (3d Cir.1979). On remand, the ALJ should reexamine his decision and explain more fully his reasons for crediting this single physical examination and ignoring the statements of the claimant and of the treating physician.
Next, Kane insists that the AU improperly failed to consider his claim of disabling pain. Kane’s wounds would appear to provide objective medical evidence of a condition that could reasonably produce pain. Green v. Schweiker, 749 F.2d 1066, 1071 (3d Cir.1984) (per curiam). Consequently, the AU also should discuss that issue on remand.
Finally, Kane notes that the AU should have considered the importance of a Veterans Administration determination that he is disabled. Such a determination by another government agency is entitled to substantial weight. Lewis v. Califano, 616 F.2d 73, 76 (3d Cir.1980). This proposition, too, should be addressed on remand.
IV.
The judgment of the district court will be vacated and the matter remanded for further proceedings in accordance with this opinion.
. To receive disability insurance benefits pursuant to Title II of the Social Security Act, a claimant must show that he was insured under the program at the time of onset of his disability. De Nafo v. Finch, 436 F.2d 737, 739 (3d Cir.1971); 20 C.F.R. § 404.320(b)(2) (1985).
. See 20 C.F.R. § 404.1567(b) (1985).
. A person who ended schooling between the 7th and 11th grades has a “limited education.” 20 C.F.R. § 404.1564(b)(3) (1985).
. The categories are "close to retirement age (60-64),” "advanced age (55 or over),” “approaching advanced age (50-54),” "younger individual age 45-49,” and "younger individual age 18-44.” 20 C.F.R. § 404.1563(c), (d) (1985); 20 C.F.R., Pt. 404, Subpt. P, App. 2, Table No. 1 (1985).
. The individual consideration of a claimant’s characteristics, and use of the grids only as a guide in such situations, is most familiar where claimants assert nonexertional impairments. See 20 C.F.R., Pt. 404, Subpt. P, App. 2, § 200.-00(e) (1985); Burnam v. Schweiker, 682 F.2d 456, 458 (3d Cir.1982).
. Dr. Katz’ definition of light work, along with his observation on the limitation on hours in Kane’s workday, is much more restrictive than SSA’s.