[#74611940] Fix sort on missing templates