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 `eval('if (false) { true }')` returns `undefined`, which was causing failing tests.