Wow, this is a vicious one!
The main (!) problem comes from the fact that streamline encapsulates the whole script into a function called "main". It should be an anonymous function instead. This is easy to fix.
What baffles me is the influence of the `eval` call. I tried the following:
(function a() {
function a() {}
// eval("true");
console.log(a.toString())
})();
It prints the empty inner `a` function but if you uncomment the `eval` line, it prints the outer `a` function. A bit beyond my grasp! The explanation must be somewhere in the eval specs.
Bruno