Sort by type, then by lower-cased name.