Partial fix of ConstantFoldingVisitor.