Move catch for function recursion detection.

Catching this at ModuleInstantiation::evaluate() should ensure the whole
function call is terminated with the first exception. Otherwise function
calls with multiple recursion points (e.g. function f(x) = f(x) + f(x);)
will still descent into the recursion multiple times.