slightly hackish fix for def environment expansions