Corrected moving the function objects when initializing lightweight_function.