DynamicScope currentScope = new ManyVarsDynamicScope(topStaticScope, null);
String[] names4Injection = container.getVarMap().getLocalVarNames();
StaticScope evalScope = names4Injection == null || names4Injection.length == 0 ?
scopeFactory.newEvalScope(currentScope.getStaticScope()) :
scopeFactory.newEvalScope(currentScope.getStaticScope(), names4Injection);
scope = new ManyVarsDynamicScope(evalScope, currentScope);
// JRUBY-5501: ensure we've set up a cref for the scope too
scope.getStaticScope().determineModule();
return new EmbedEvalUnitImpl(container, root, scope);