function-graph: Allow writing the same val to set_graph_function