Are the dwarven dwellings being rebuilt?
If so, their blocked tiles differ from other level 1 dwellings, which is why this problem occurs. I don't know exactly how to solve it; either change these tiles for the dwarven dwelling, or don't rebuild it, but destroy the old dwelling (RazeBuilding) and create a new one (CreateDwelling).
And how can I determine in my code that these are level 1 dwellings? (Others are rebuilt normally)