I suppose that the issue of non-resident gun permits could get confusing. Throw in a few police officers who don't know the law and a prosecutor who may have political ambitions and you have a situation like this. A nearly identical situation involving only one person in my city several years ago cost the city a $10,000 settlement.
It should not take as long as it has for the authorities to sort out this kind of thing. Somebody messed up big time.
It's a mechanical device, designed by humans, built by humans and operated by humans. What could possibly go wrong?