Villagers getting stuck in palisade walls after building

Playing as Zhu Xi’s legacy, villagers will sometimes get stuck in palisade walls after completing them. i have had this happen on several occasions and it seems to happen most frequently when walling to a forest that has been partially chopped down. See attached link for example.