Having generals won't mmake the duplicate name problem go away.

And spies are a waste of time.

In the game, just before you use the script, use the console and type, character_reset Hanibal (what ever surname you will give the scripted hanibal). If a error comes up saying he doesn't exist, then you know the name slot is free.