fixed the tricky non-deterministic tests

But this is not completely done yet, as we need to fix the alpha equivalence problem for outputs with symbolic variables.  That is a separate problem, which we will address later.