fix: mutable default argument in _visit_with_path
#8130
+3
−1
_visit_with_path
#8130