Reference to currentScript now safely enclosed.