Sandboxing JS closures