High Sierra broke alphabetical sorting: Sort Script Editor templates?

I needed to update from El Capitan to High Sierra, and apparently it introduced quite a few not so great quirks. One of them is messing up my Script Editor templates folders so when I open the menu from Script Editor, they’re all mixed up. It now takes me ages to find anything because I had a specific naming scheme and the template names were long for filenames in order to properly give me an idea of what each template contains. I know this isn’t an Applescript issue per se, but it’s with Script Editor where I came across this for the first time and it severely affects the workflow of writing scripts so maybe it isn’t completely unrelated either; Anyone who uses templates has probably been faced with this.

Following script should help with alphabetical selection:


set |selection| to choose file of type {"scpt", "scptd"} default location ((path to startup disk as text) & "Library:Application Support:Script Editor:Templates") as alias

-- open template script
tell application "Script Editor"
	set templateDoc to open |selection|
	set theText to text of templateDoc
	close templateDoc
	set text of (make new document) to theText
end tell

-- hide this script, bring new script to front
tell application "System Events" to keystroke "m" using command down