Don’t see how either of your good instances would be enforceable.
As far as I know its still legal for one to sell or gift to another, private deal, no record. Of course if the gun ends up involved in some illegal incident, they will come talking to YOU.
We can blame the stupid LEO for this nitpicky one.
You are right. The law is even stupider than I thought