Steps to see the problem :
-parsing these 2 expressions with xpath will demonstrate that there is a small inconsistency in the <ul> element :
1.//ul[@id='admin-icons']/li/a/span/img this would be the correct one
2.//ul[@id='admin-icons']/li/a/img => this lists only Annotations, Search and Invitation
The second expression lists the Applications that are installed in XWiki, and configured via ConfigurationClass.
Within that class there is a <span> element that should be added.