Refs #5766 - Adds more informative error on bad JS loading order