MZ createDisplayObjects command execution order

Salve, fellow makers!

Behold the following snippet:
createDisplayObjects.png


Based on the first function, Scene_Map.prototype.createDisplayObjects, it is my belief that this.createWindowLayer (and therefore this.createRewardsLayer) should be executed before this.createTreasureChestSprites.

However, upon execution, this happens:
createDisplayObjectsDebug.png


As you can see in the console output- 0, 4, and the error- it appears as if this.createTreasureChestSprites is being executed before this.createWindowLayer (and therefore this.createRewardsLayer).

Now, I know how to "fix" this problem (by moving the createTreasureChestSprites command to createWindowLayer), but I am just wondering if anybody can explain to me why the command execution sequence isn't occurring in the order that I think it should?

Bonus question: how do I remedy the two SourceMap errors?

Thanks for the knowledge!
Never mind, I figured it out by doing this:
createWindowLayer.png


Still don't know about the SourceMap errors though. But they are not disrupting anything.
The SourceMap lines are warnings (yellow), not full errors. More info:
Yep, it's harmless. I think sourcemaps are just a kind of signpost for the debugger, apparently used for breakpoints etc:

You can either remove the sourcemap reference, by deleting this line at the end of your project's pixi.js file:
JavaScript:
//# sourceMappingURL=pixi.js.map
...or you can add the missing pixi.js.map file to your project's libs folder (by default RMMZ seems to be currently using PIXI v5.2.4, so I'm not sure which version of the sourcemap would be relevant):
The SourceMap lines are warnings (yellow), not full errors. More info:
Great! Thanks, @caethyril !

Original thread: https://forums.rpgmakerweb.com/threads/createdisplayobjects-command-execution-order.142444/