Better error candidate selection for anonymous methods
Recover more from invalid throw statement. Fixes #12889