Eliminate global when, switch stacks

This supports instantiation of modules within when statements.  Note
this is not conditional instantiation, which does not make sense. It
is equivalent to instantiating a module outside of the when statement.