We have in our script something like:
var e = document.createElement("script");
e.text ="X";
After running this code via Env-js Rhino complains that X is not defined, it means that this created Script node is evaluated immediately even if it is not attached to document. That is wrong.