Resolved customConfig reace by creating scriptLoader.queue().
Fixed scriptLoader#queue getting stuck after the first time used.
Merge branch 't/6504'
Changelog entry for #6504.
Using \s when searching for attribute boundaries as \b is way too broad.
Changed String#substr to String#slice which is a part of a standard.