Tool bar gone bad…

What could possibly cause my tool bar to all a sudden repeat the Inspector icon over and over again?

What is the solution? What can I do to fix this? To make sure it doesn’t happen again? And no, I did not attempt any customization to the tool bar before this happened.

It seems like the toolbar is a bit more grumpy in recent macOS updates than it used to be. I’ve seen a few odd cases with it, but I bet most can be cleared with the advice given here: