PS: I also tested it on a book with an author like “Dr. First Last”. I believe Calibre has (some?) such titles built into its logic, so the author sort for this author was already set to “Last, First” without any intervention on my part and the template worked flawlessly. If you have an author like “Title First Last” and the author sort is not set correctly, you may run into issues. But of course I hope you expect to have “Garbage In, Garbage Out” if you know you're dealing with poorly-curated metadata.
PPS: I've also tested with authors with author_sort values like “Fitzgerald, F. Scott”, “Fonseca, Josa da”, “Le Guin, Ursula K.”, “López-Alt, J. Kenji”, and mononyms like “Aesop”; basically all the “strangest” examples I could find in my tag browser, and it seems to work for any and all of them, and for combinations thereof.