The _AL_JOYSTICK_INFO generated for controllers that exist in the controller database contain every button/stick possible - however, not all controllers support every button or stick.
For example, the 8bitdo micro does not have thumb buttons or a right stick, yet allegro reports that it does.
_al_fill_gamepad_info should somehow skip over buttons/sticks that do not appear in the controller database mapping.