With the recent versions of the git, I found that removing a weapon mod would NOT increment the number of slots available. Repro’d this with multiple weapons and mods. Also found that saving & quitting entirely (simply saving to the main menu and back was insufficient) would reset the number of slots to the default for that weapon, even if mods were installed.