Emitter: eval_tree now has a fourth param: did_resolve.

I've been pretty certain that there has been a potential for double resolving
for a while now, but haven't been able to nail down the code to show that it
can and does happen. Now, sample code has been added as a test with this
commit.

A generic should only be resolved once. This is because a function may map the
generics to other spots (ex: A function may specify A, B, C, and be called
from a generic in the order of C, A, B). In such a case, resolving a type
twice yields something that it is nice.

In the given proof, A is set to list[any], and B is set to list[A]. However,
the A should not be resolved (it's the caller's A, not the A of the function).
Resolving it results in type inference being incorrect, which is pretty bad.