This has been seen with a bug in KMC2. The problem is a "funnel shift" operation which shifts by the number of bits in a word. Conceptually, the code shifts the value out of the word entirely. However, the actual behavior is undefined for the language. An implementation may shift by the log2(wordsize) least significant bits of the shift-by value, which means no shift at all, and thus a value which should be shifted out under certain cases in the KMC2 code actually remains unshifted. This unshifted value is added to the return value in their API and corrupts the k-mer value. There is a workaround in io.hpp which can be uncommented..