normally, modules and expanded_modules should be set already when reaching this point. Isn't this equivalent to say just:

```
modules[module.name].lang = ['languageholder'];
```

and the same for extended_modules? I don't think we need all this duplication of code for something that already happens before.