Ensure each graph material_function only evaluates the input links that are connected to it.
This requires more testing and the foreach_linked_input_recursive function might be better placed somewhere else.
GPU_NODE_TAG_FUNCTION is no longer needed, so it could probably be removed too.