The cause of the bug is not understood: Adding KeywordElements to a vector and sorting afterwards, everything works fine. Inserting it into a set and iterating over the set afterwards gives an inconsistent set. I have currently removed the previous introduced workaround for the solaris compiler!! Needs to be checked.