This has been flagged by the `use-before-define` ESLint rule via
Coala/ESLintBear for a long time.
These assignments don't work as intended. However, the overal code
still worked because these assignments aren't actually needed.
Previously, the structure for each file was like so:
```lang=js
var PETRA = function(m){
m.something = …;
…
return m;
}(PETRA);.
```
The `var` declaration would silently ignore creation of `PETRA`, because
it already exists as a global variable by this point. And that's good,
because if it didn't exist yet, the `m.something` assignment woudln't work
as you can assign a property to `undefined`. Removing that would lead to:
```lang=js
PETRA = function(m){
m.something = …;
…
return m;
}(PETRA);.
```
This creates an unnamed function, then immediately invokes it with the current
object reference stored at `PETRA`, the function than augmnets that object,
returns the same reference, and stores the same reference, in the same var.
This is a no-op.
Remove it leaving only the file-level function wrapper so that we don't
leak variables to the global scope. This known as an "IIFE" or the "module
pattern". Same as before, but without the odd variable indirection.
Ref #5524.