I had this problem too. I had a fully modded blue sub-carbine equiped on the loadout, but not showing. I thought maybe it was a graphic glitch. I Fast traveled to my friend and noticed the item was no longer in my inventory at all. It just vanished. I tried to see if I could find it in Buy Back at least on a merchant (not that I sold it). No luck. I relogged. No luck. I submitted a bug report and a support ticket. No word yet.
Server kicked me out. I suppose it died. Now I have this issue too. Primary slot blank. Weapon does seem to be in inventory. Can't cycle between builds. Tried restarting etc. Frustrated at this point.
Well... There is a way to fix this. Search on locked load outs. Basically, you will loose your glitched weapon(s). You may have to do it several times. I had to do it once per build that was broken.
Essentially kill some enemies. Pickup dropped weapons by holding down "X" so it will load as your primary weapon. Rinse and repeat until all build slots are cleared.