Maine shooter could not own a gun legally