Recover more from invalid throw statement. Fixes #12889