Would it be possible to change the value semantics of `ValueCollectingVisitor` instead?