@singingwolfboy -- As noted yesterday, this turned out to be an issue in practice. An inline script runs immediately, while a script file runs once it's loaded. That's why your test didn't detect the problem.

I committed an old-school fix in 2b6f5d6. I don't know if it's compatible with AMD, but I need a way to work on the toolbar until we figure out a solution. If you have a better alternative, let me know!