I need to get HDD serial number to use it as a key for licensing a software. I used diskid32 code in this url: http://www.winsim.com/d
I use the same approach (and same code) in my software licensing. Yes, Windows 8 for some reason is returning flipped values for this method, I can't say why (so I can't answer your question).
My solution is the one that you pointed out: Flip the values again. So, after calling the "flipAndCodeBytes", you could test if is a Windows 8 OS, and flip the values.
In my case, it's working now (I got the same values for Windows XP/Vista/7 and Windows 8).
Good luck!