have you tried it without the

console_command set_building_health Burdigala agee 0

line? that doesn't actually destroy the building just damages it 100%
when you add new building from script it gives settlement both buildings, despite fact they are in same tree. So maybe AI's attempt to repair old building at same time as getting new building is what is causing problem?

Do you have enough spare building trees to split them up to prevent weirdness in the same tree?

If its not that and its only related to certain factions / cultures check for missing EB texts for certain factions, or if its related to Carthaginian new building problem.