Improve propagation of global this

Issue #236