To know if link is connected to dangling reroute and can be skipped as value-less, we need to know if reroute is dangling. This requires graph traversal. Currently this is done by non-recursive iteration. But this can lead quadratic complexity for some of the cases. Other way is to make this linear while cache building. Pull Request: https://projects.blender.org/blender/blender/pulls/120375