Fixed goofy logic in haptic device comparison code. Mitchell Keith Bloch did the research on this bug, and came up with a slightly different patch than this. Partially fixes Bugzilla #2126.