Large mortgage lenders such as JPMorgan Chase (NYSE:JPM) and Citigroup (NYSE:C) are ramping up efforts to modify loan terms, in hopes of avoiding foreclosures and keeping homebuyers in their homes. However, Bank of America (NYSE:BAC) is running into a potential roadblock, as the complexity of securitization rears its head.

In a settlement relating to charges brought by state attorneys general against Countrywide Financial, which B of A acquired in July, the bank agreed to modify as many as 400,000 loans. B of A only owns about 12% of these loans; the rest are owned by mortgage-backed securities investors.

B of A did not consult with the investors in putting together the loan modification program. Instead, it's invoking its "delegated authority" to make the changes. Some investors are claiming that the bank is trying to shift the cost of its settlement onto them, and they're prepared to sue. Loan modifications to avoid foreclosures can benefit investors, but the devil is always in the details.

Unfortunately, even if B of A pushes through its loan modifications, it may only score a Pyrrhic victory.

Loan modifications are no silver bullet
Indeed, the experience of British bank HSBC (NYSE:HBC) -- which, like Citigroup, acquired a U.S. subprime lender (Household International, in 2003) -- shows that modifying loan terms is only moderately effective in avoiding foreclosures. And HSBC's case isn't unique; it's consistent with a housing bubble in which homebuyers were taking out loans that they could never come close to repaying. As a result, sorting this mess could be more complicated, and more painful, than bankers are anticipating.

Two banks that recently acquired notoriously careless mortgage lenders should be paying close attention to the B of A and HSBC case studies: Wells Fargo (NYSE:WFC) with Wachovia Bank (NYSE:WB), and JPMorgan Chase with Washington Mutual. Whatever happens to B of A might be knocking on their doors next.

Further foreclosure-free Foolishness:

Lower equity prices will mean higher future returns for those who have the courage to invest in outstanding businesses now. The team at Motley Fool Inside Value can help you find those businesses. To find out their two latest stock picks, sign up for a 30-day free trial now.

Fool contributor Alex Dumortier, CFA has a beneficial interest in Wells Fargo, but not in any of the companies mentioned in this article. JPMorgan Chase and Bank of America are Motley Fool Income Investor selections. The Motley Fool's disclosure policy is glad to be a renter, for once.