Perhaps using a tuple instead of a vector would help, like this:
julia> using Symbolics
julia> 1
1
julia> Symbolics.Term(exp, (ans,))
exp(1)
julia> Symbolics.Term(exp, (ans,))
exp(exp(1))
julia> Symbolics.Term(exp, (ans,))
exp(exp(exp(1)))
The relevant struct uses a Vector{Any}
field anyway, so this is of limited help; but perhaps sometimes it makes sense to use a tuple.