I think we should change this to be a function instead. As it is right now (and also in the original code) it runs at compilation time. That would bring all kinds of problems if the code is AOT compiled for instance. We want this to be delayed until execution time, to get the environment in the correct context