If any debt originally incurred was lawfully incurred and issued and, at the time the debt was incurred, the portion constituting nonelectoral debt or lease rental debt was within the limitations imposed thereon by law, the issue of refunding bonds or notes or the adjustment of lease rentals in respect of the debt shall be lawful and valid, notwithstanding that the aggregate of outstanding debt shall thereby exceed the then applicable limitations set by section 8022 (relating to limitations on incurring of other debt), which limitations shall be deemed increased but only to the extent necessary to effectuate and amortize the refunding lawfully. Any portion of the refunding bonds, notes or obligations may be excluded from nonelectoral debt or lease rental debt, either as subsidized debt or self-liquidating debt, in accordance with the procedure provided in Subchapter B of Chapter 80 (relating to limitations on debt of local government units).