On the other hand, that's exactly the reason you want to have IP assignment clauses in contracts with startups - it gives a lot of incentive to the client to fully pay the invoice in case of a firesale.
I have seen cases where a company went bankrupt, but at the same time sold the software to another company held by the same people, cheating freelancers out of their money. That cannot happen in this case, as the IP assignment blocks the sale unless the buyer agrees on paying out the contractors.
As a contractor, that's your only lever in that case.
Your case only works if the client is actually solvent.
If it's minor payment dispute, they they can just pay the invoice and get on with the M+A transaction.
Personally, I can't see why the client should expect to own work done at their request if they haven't paid.
For any good client, an investment round or M&A transaction is to them what my fee is to me, and my fee is to them what the late charge on my waterbill is to me—easier to just pay the $1.20 than to give any fuss about it.
In other words, if they're that worried about it, they can always just pay the dispute and sort it out later. My business, however, might be significantly hindered by them not paying.
I've never in my life had trouble collecting an invoice. Once I resorted to a collections lawyer[1], and the company paid by wire within two days (it was a six figure invoice). Knowing your rights and leverage is more important than demanding unusual clauses in contracts (and Patrick, I say that with all due respect as a friend).
Another point: Reputable companies have a lot to lose by shafting contractors. This is the real reason it pays to work with reputable customers.
[1] For the curious, the lawyer threatened to put a lien against the company, and they suddenly realized that they really did owe me the money. Feel free to email me with any questions.