Tak właśnie działa biblioteka Joomla - funkcja mergeHeadData() - grupuje elementy head-a kolejność dodawania jest widoczna dopiero w grupach.