Funny, I was looking at that GetVersionEx code when you replied. Now you know why I suggested the Brute-Force method.
On the idea of file-check, the problem with a damaged system is missing/damaged file(s). I originally thought that wbengine.exe was infected and removed by someone prior to me working with the system. However, I did run the (optional) SFC and knew something wasn't right. That's a chicken or egg problem as to which is correct, i.e. is missing filing a real test of OS Name. It is an excellent reason to run SFC, if you decide to go that way.
This is a tough set of choices, but I can see where there are situations where services are added to product with Service Pack, e.g. XP Firewall, and where Services exist in different product versions, Vista Home vs. Business and Wbengine.
What about a switch to select (or override missing or mismatch) for product discovery problems? At least you would have opportunity for input to the decision.
Whatever you decide, it will still give you code update problems, courtesy MS. That comes in the EULA Fine Print, page 187.