Collections which were pointed by a modifier used to follow visibility of the current object, and this visibility is static throughout the lifetime of the dependency graph. Change the code so that collections pointed by modifiers rely on the visibility flushing, allowing to be optimized out from evaluation. Pull Request: https://projects.blender.org/blender/blender/pulls/120516