To me it seems APD and local FBI used all means to get this individual into the mental health system. Additionally, they seem to have been at a loss for having a legal ground from keeping the weapon from him. 

So where does the weak point lie? Possibly in the mental health sector? He was deemed to be of risk by police, who sent him for treatment. On what basis did the medical facility feel he was no longer a danger to himself or others? I think the weakness is there in the mental health sector that let him free without restriction knowing his gravity towards "isis" or terrorist activity through his mental condition. The cops made numerous efforts at this individual in response to his violations, did the hospital not have grounds to keep him hospitalized in the mental ward?