My advice is invariably "Get it fixed" meaning having the problem diagnosed and repaired. I never advise "delete the thread", as I feel that is a personal matter to be considered carefully, as a "what do I do about..???) could be evidence for EITHER the defense or the prosecution, depending on circumstances.
One of our resident legal eagles can explain it in detail, that in general, while the law may state: "xxxx is illegal", and nothing further, there are legal principles involving motive that determine the difference between a prosecutable crime and an accidental violation of the law.
TIME OF POSESSION is an important factor in determining INTENT in a case where a gun malfunctions and goes full auto., And, that would also apply to the "uptight" LEO in the situation described. Yes, he's acting within the law if he impounds the gun and you, right there on the spot.
HOWEVER, if that happens, you have a good chance of either getting the case kicked out, or prosecution declined before getting to court, simply because you had no opportunity to demonstrate criminal intent. A good chance, but not a guarantee.
Simply put, if the gun goes full auto, and your response is "Holy CARP! that never happened before!!!" and you start field stripping the gun, putting it away, saying "this baby is going to the gunsmith first thing tomorrow", the usual response of the authorities is not to prosecute. Usually.
On the other hand, if it goes full auto, and your response is "Cool,..." and you put it away to hang on to, (unrepaired and with no effort made to get it repaired) looking around to see if anyone else noticed, hoping to keep it FA, and unknown to the gov. until you need a FA (TEOTWAWKI), THEN you are deliberately breaking the law and there will be no hesitation to prosecute.
(and damn little valid defense, either.)
My advice, is, that if you aren't busted on the range, as soon as business hours allow, (same day if possible, next business day at the latest) you deliver the malfunctioning firearm to a licensed repairman. And then go see a lawyer.
And if the lawyer tells you there's nothing to be done, you're going to jail for having a machine gun, get a different lawyer, ASAP.
Cases of people being prosecuted when their gun malfunctions (breaks) and goes full auto and they turned it in for repair as soon as reasonably possible, are so rare we never seen to hear of them.
A case where an AR went full auto, and the owner kept it for a year, before being caught, his buddies all knew he had it, he even loaned it out, THAT case I heard of!, And I do believe he was convicted....
Do note that immediately sending the gun to be fixed (and getting a lawyer) only applies if you desire to keep the gun. If you have no desire to keep the gun, you can turn it in to any cop shop 24/7. You won't get it back, ever, but it does demonstrate you are attempting to act in "good faith" and significantly reduces the chance that even a zealot DA will prosecute. Significantly reduces does not = no chance, however.
Hope this helps answer your question.