First time this appeared to me during 0.869 stress test when i discovered i could build firebases using the xfire ingame without having to press fire button the whole time. After the firebase was ready i turned off the xfire in-game and started running to rest of my squad. After some time i stopped and my gun started firing like crazy.

Switched back to shovel and pressed few time my firing button. Took my gun back up and it didn't do it again. At first i thought it was my mouse fucking around because it had done it sometimes, not in 1½ years tho.
When playing 0.856 after that i used the same thing to build firebase and after i got my weapon it started firing again. Luckily i didn't have saw this time

.
So it seems like after disabling the xfire ingame system the game still thinks i'm pressing the button i pressed while turning on my xfire ingame. Not sure if this related to PR or xfire.