Allows functions to be passed into lua_next.