Fix error on functions ending with @goto.

Fixes a lingering issue with #5699.