It would make sense to have a faction hierarchy, so you still assign one single faction to an NPC yet he belongs to all of them.
Why not have both? Faction Hierarchy and Faction Priority, a 2d table of Factions. For example:
Last Subgroup of Faction <- Subgroups... <- Main Faction ; * is the active Faction
Market Merchant <- Merchants <- Village A
*Carpenter <- Craftsmen <- Village A
Carpenter <- Craftsmen <- Village B
Homeless <- Slums <- Village A/B
Bandit <- Bandits <- Forest B
If the player kills a merchant at the market, there's room, so this NPC fills that role. "Somebody killed NPC B, so I took his place. Do you want to see my wares?"
If the player destroys Village A by, let's say, killing all the important people and there's nobody to fill their roles, then the NPC goes to Village B and work as a Carpenter. If he can't, he becomes homeless.
If village A and B are destroyed, then he's screwed. Last resort. He goes to the woods and start the living the life of a bandit.
Hierarchy is good for reputation too. Let's say that the player did something very bad. Commoners, Craftsmen will not like that, so -5 to their attitude towards the player. Merchants don't care, they just want gold. Nobles? They think that was reprehensible, so a -20 or worse to their attitude.