I know this is a old question but I just ran into the same issue.
Using Linux with gcc.
Disassembling the function showed a lot of jumps in the code, where the exception was thrown, which shouldn't be there.
In the end, a Clean Build resolved the issue for me.