Convert FindFunctionInStream to return an error_code.