fix infinite loop when there's no exception handler. fixes #2361
Merge branch 'master' of github.com:JuliaLang/julia