how long have you had the name of your pet before you renamed it? at the beginning, there really wasn't any limitations on names so you could have a pet with the same name as a character when pets were first made. then a little while later restrictions were put in place. I wanted to make a character with the name I had given my pet recently, I couldn't until I renamed the pet, to free up the name.
It's possible your pet name was named something the same as a characters name before the restrictions were put on the names, but those restrictions didn't force any pet names to change after they were put in place, so your pet could have been going around with the same name as a character all this time.
Another possibility is after you renamed it, the game spawned a twin pet with the old name somewhere in the world. I'm not sure if that was fixed in this release, but under the last release, when you renamed your pet, a clone that never left the world unless removed by GM would appear somewhere around the world, and t would have the old name of your pet. If it's still a bug in this release, then its possible it spawned a clone after you renamed you pet, then when you tried to rename your pet back, the game saw this clone with this name already in the world, and wouldn't let you switch it back becuase of name conflict.