My idea to get around this is to just re-word the contract so that the developer is "selling" their app to Apple (maybe this is an option the dev could choose if they want to use IAP, and there could also be an option for Apple to "sell" the app back to the developer).
That way, instead of "Apple is taking 30% of each dollar the developer makes", it changes to "Apple buys product from developer, sells it to customer, then pays a 70% royalty to the developer." In other words, it's now Apple selling (instead of reselling) the product, and Apple is already indemnified.
Now, this would not necessarily stop Lodsys from suing, but it has some important implications. It makes it easier to argue that they need to primarily be suing Apple instead of individual developers. And it makes it easier for Apple to claim they have a right to intervene in any lawsuit not directed at them. Obviously, everyone would prefer it's Apple bringing its considerable resources to bear on the problem than individual developers who can not afford the time or cost of lawsuits.