This appears to go back a ways, likely before v1.7.8 even:
If a joystick button is assigned to the "When I press button" option of a command (this assigned does not can have occurred at any point, it does not have to be new), and that option is unchecked and the command saved in that state, the command list will show the assigned button grayed out in the "Button" column, but when editing the command again, the "When I press button" option will show "Not assigned" in gray and unclickable.
If the "When I press button" option is checked now, it will then show "Not assigned" in black and clickable, and will not pop up the button choosing dialog (though that dialog can be opened manually, and it will show the previously assigned button). The command can then be saved, and the previously selected button will be functional again.
Editing the command again now shows that previously selected button on the "When I press button" option, as expected.
EDIT: Fixed in v1.8.3.9