Take handle of device info into account when comparing them.

This way the Keyboard (Devices Desktop) node chose the proper keyboard on my system.