[Fix] fixed recursion in smarty_function_render