It's funny you mention that issue, jinjinjin, as I've noticed the same problem in the last few days, where my game won't recognize a PS4 controller unless it's plugged in before any other controllers.
I've tested all types of controllers, including Ouya, Nexus Player, PS3, PS4, Xbox360, and XboxOne, in wired and wireless modes, on PC and on various Android devices, and this is the only issue of this kind I've encountered so far. Most of the time I haven't had any issues mixing and matching controllers, though I'm doing custom mappings and other stuff that extends default functionality.
It may be a hardware quirk rather than anything to do with AIR or our own code. Since a PS4 controller reports itself as "Wireless Controller," it might be the same thing you're dealing with with your generic Logitech device. I do know that a Xbox 360 wireless dongle can sometimes interfere with other devices (for example, when plugged into an OUYA, it claims all four controller slots)
I haven't really looked into it yet. For now, I'm avoiding dealing with it, but I suppose I'll have to solve it eventually. I'll report back here if I do.