I found an error in my ASP.NET 2.0 assembly-renaming script (see Renaming ASP.NET Assemblies).
The regular expression isn't matching all assembly names that might be generated by the compiler. This expression does the trick:
(?'assembly'App_Web.+\s*)\042
Simply replacing the pattern in the nant regex task solves the problem.