It's fashionable to talk about how the housing crisis hurt millennials. But we tend to forget that the slightly older Generation X bore the brunt of the pain -- and continues to bear it.

True, millennials have been shut out of the housing market through a combination of rising rents and high student debt, which keep them from saving enough for a down payment. But most of the current crop of young adults were too young to feel the acute pain of the housing crisis, and their troubles are only one of the many lasting effects of the late 2000s.

Gen Xers, on the other hand, were mostly in their 30s and early 40s when the housing crisis hit -- just old enough to have bought a house. By 2009, many of them found themselves either underwater on their mortgage, or in foreclosure and completely forced out of their home. Gen X was in the wrong place at the wrong time, economically speaking, and in many cases the consequences of that continue.

Nineteen million of America's current renters used to be homeowners, according to a new report from the Urban Institute. Some of those are older retirees who have sold their homes and downsized, but most aren't. Nearly a quarter of those former owners (4.2 million) lost their homes to foreclosure as a result of the housing crisis. Most of them are now middle-aged and still renting, as you can see in the chart below:

Urban Institute

Laurie Goodman, one of the authors of the study, told The Huffington Post she was surprised at just how many Gen Xers turned out to be in the renting-but-used-to-own category. The housing crisis changed the profile of renters in this country, adding a huge crop of middle-aged people, who in any previous decade would have owned their homes.

"You always hear about renting just being the preference of the millennials," she said. But her data show that renting has also been forced on many older people over the last 10 years. "You don’t [often] see it quantified how big an impact the housing crisis had on homeownership."

Gen X is the unlucky group that was just hitting full adulthood in the mid 2000s. The 35-45 age group in the chart above would have been between 27 and 36 back in 2007, which puts them right at the age when people generally begin starting families and buying homes. New homeowners have the most debt and the least equity in their properties. When the crisis came, newer homeowners didn't have years of payments and value appreciation to cushion the blow when home values around the country fell between 10 and 30 percent.

Imagine you bought a $100,000 home in Phoenix in 2007. You put 10 percent down in order to get a mortgage, and though that $10,000 was most of your savings, you were taught that housing was safe. By the end of 2008, that house was probably worth less than $70,000, and you were stuck in it. Then, say you lost your job in early 2009 and couldn't make your house payments to the bank. You'd lose your original down payment -- that is, all your savings -- and on top of that you would need to look for new rental housing if you wanted a place to live. Eight years later, maybe you've scraped together enough to make a new down payment, but more likely your credit is shot and you're still living in a rental.

Of the 9 million people who went through a foreclosure between 2003 and 2015, 4.7 million are still renting, according to the report. That, in turn, added more people to the rental market, driving up demand, and prices. That means rents are higher for younger people who are trying to cobble together savings for a down payment, making it harder for them to buy.

It's a vicious cycle that has left a permanent scar on the American housing market, according to Goodman.

"People will repair their credit over time but the foreclosure crisis is going to leave a lasting effect on the homeownership rate, permanently raising the number of renters," she said.