lots of debugging to find problem. I think its in the getValuePair code
more debug code. it seems that evalExp ENEQ (and others) use the getValuePair function which finds the values but doesn't update the environment, so the comparison works but the value is never actually stored.