I think the problem is the Rewired plugin, which has only very limited controller support out of the box.
I'm just guessing, but you may be querying for the presence of any controller, independent of it's actual support; see https://guavaman.com/projects/rewired/docs/SupportedControllers.html#controllers... for more information and how to get reasonable controller support (untested, but this may explain your problem ;-)).