Fix for test with multiple scripts

Previous version was always failing tests for let statement and generator functions. The reason for this was the fact, that tests with multiple scripts have in last script an if statement. And because `eval('if (false) { true }')` returns `undefined`, tests were failing.