Fix pickling of FunctionGraph.