You're comparing the content of one element with the name of another.
You're relying on XSLT's "existential equals" where A=B is true if any node in A is equal to any node in B. But this only works where you are comparing the values of nodes, you can't use it to compare other properties such as their names.
Assuming you're stuck with XSLT 1.0, you can use logic along the lines:
<xsl:if test="not(preceding-sibling::*[name() = name(current())])">
You need to use this to test each node in turn, because of the reliance on current() you can't easily select all the nodes that satisfy this condition.
Better, move to XSLT 2.0 which makes it all very easy with xsl:for-each-group.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference