I didn't check actual code, but I think this is simple.
Extension loading and startup script execution are two different thing and must be separated.
First, ALL extensions must be loaded. Order is not important, it may happen in any sequence, depending on definition order, recursion method, etc. Don't care.
Next, when all extensions are loaded, startup scripts are executed. At this point can't be missing extensions, so startup scripts must work. The only issue is their execution order. Easiest way is alphabetic order. There are two prerequists:
1) An extension is allowed to install a startup script with any name independently of extensions name
2) There must be a cooperation between extension maintainers and core team to keep it working.