Dont get caught up in the "Have to purchase it after the lease ends". Its a mortgage in spirit, but for the benefit of the parties involved, its technically a lease. That means you have have to write it like a lease. You cant just slap the word "lease" on it and then write it like a mortgage, because if it ever came to court, the court would say its obviously a mortgage. So, part of that is a lease cant end with the person now owning the property outright, unless it has an option to buy at the end of it. That option to buy, MUST, by law have "consideration". That consideration can be $100,000,000.00, or it can be $1. It doesnt matter how much it is, but it MUST be there.
I can almost guarantee you, the option to buy at the end of the 40 years is $1. I work in real estate, albeit in a different country, but most countries real estate laws are based on the same general principles.