Added DeepCopyVisitor to fix BetaReduction