Report an error for undefined functions.

Before, the exception Not_found would be thrown
and no error information would be shown.