I don't know if a rewrite for the sake of license compliance because of an actively litigating party has ever happened in OSS. In practice, we just don't know how far someone would go to prove ownership over individual characters in a source file.
"It is possible that there may be Mozilla source files containing contributed code for which the copyright holders refuse to grant permission for relicensing under the MPL/GPL/LGPL triple license. In those cases we will investigate whether the situation can be resolved by someone writing new code to replace the code which cannot be relicensed. (This may require writing a complete new source file, or simply rewriting one or more portions of an existing file.)"
https://www-archive.mozilla.org/MPL/relicensing-faq.html#per...
[1] https://en.wikipedia.org/wiki/UNIX_System_Laboratories,_Inc.....