Using the random button in the Arsenal can give players access to attachments that they don't have access to in the arsenal and ignores attachments that they do have access too.
In the example mission I have provided the following happens.
Current Arsenal value
Using the random button will give the player randomly the MXM. Expected
Sometimes this gun can also come with a suppressor. Not Expected
The random load out does not include available optics. Not Expected
As you can see in the code block above the only things that should be available in the arsenal are the MXM and the AMS
Here is a small video showing the bug in action: https://gyazo.com/8c1a02da27c52623ea45dfc258a5396f