[Blazor] Fix null reference exception caused by ambiguous routes (#39833)
[Blazor] Fix null reference exception caused by ambiguous routes (#39833)

When two Blazor routes are ambiguous the generated exception is obfuscated by following attempts to access the route table.

The reason this happens is that we update the route key before we compute a new table, and when the table fails, the next time we try the key, we return null.

The solution is to wait to set the key until we've successfully computed the route table to avoid hiding exceptions in that case.
aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore,aspnet/AspNetCore