For some reason larvaes, pigs and other entities go around walls yes but when there is a gap in the wall and there is any structure with blocker tag the AI seems to chose go through the gap with the blocker insetad of going around the wall which makes the AI look dumb and broken.
I've tried fixing it by adding statues from Potter's wheel to pathfinding
(NOTE: the reason why larvae broke the wall at the end is cause i've edited the code cuz it does not work properly as if you ran vanilla)
1. Build a long wall along dragonfly desert and make a gap in it
2. Fill the gap with any blocker like statue, sign or meat bulb or whatever
3. See how the AI attempts to go through the gap with the blocker