Added a method for getting the top-most environment, and modified %import to add values there, so they are visible regardless of the current nesting depth. This may well change in the future once module support matures, but for now it guarantees imports are never accidentally lost.