View attachment 263617
Found this while picking through parts today. Jim got it right. This is the backside of a shift drum stopper lever assembly. The rivet has the tell-tale peening hole, as seen in the OP's original pics. Everything else is right too, such as rivet depth. The shift shaft rivet does not have a peening hole.
The question now, is how the OP's failed rivet failed. It would take a lot of force to pull that rivet out. I think it would be hard to do if you tried. In use, it seems like the forces on that rivet would be sideways, not axial.