fix findFun failure handling to avoid longjmp (copied from https://stat.ethz.ch/pipermail/r-devel/2007-July/046261.html)