What is happening is that each bone needs a unique name at all times.
The "Flip Names" operator works one bone at a time, which in your case
generates a conflict during the renaming.
This patch handles that by temporarily adding a suffix whenever a
conflict would happen, and then stripping back the suffices.