Fix frame traversal while searching for error function.
Merge branch 'master' into agentzh