Restrict self-noding to target env too

Also, disable the optimization for DIFFERENCE, which seem to fail
in some cases