Hold on... You said a hero appeared in the tavern, but I'm telling you about the circumstances when a hero appears in the city... This isn't the same situation. If the city is empty, and there's a hero in the tavern who is forbidden on the map, I don't even know how that's possible...
I checked again – all heroes are disabled, but if you enter the castle in the editor, you can add either a Ranger or a Priest. But where did the Priest come from if I disabled them all...?
Maybe this will help, are you aware of this?