I've long advocated for refund clauses in royalty settlement agreements, in the eventuality that the patent is invalidated.
Well, most large companies are probably not directly paying royalties, but instead bartering by cross-licensing their own just-as-presumptuously-valid patents :-)