Long time lurker here,
I recently started playing again in 40.19 and I've been experiencing something odd when putting dwarves up on walls behind fortifications. In short, I'll have an invasion come along (or something else nasty), put my crossbowmen on the wall (or in a shooting gallery) one z-level above the ground with a floor under them, a floor (or roof, rather) above them and no way out of the fort. The dwarves will fire a bolt or five and then proceed to "loose grip of the wall" and fall off on the other side of the fortification and into their certain death. I redeemed this by putting the entire entrance two z levels below the surface (and thus they had two layers of solid matter above their heads), as it seemed like they were climbing up two z-levels and jumping off the roof. They don't seem to squeeze through the fortifications or anything of the sort - more like attempting to hang off the wall with one hand, but not being able to as they have to use two hands to operate their crossbow. I was able to circumvent the issue another way as well by placing a "wall behind the wall"
Crude representation of the wall:
fff
dfF
xfF
ufF
Crude representation of "fixed" wall:
ffff
wdfF
wxfF
wufF
w=wall
f=floor
F=fortification
d=down stairs
x=up/down stairs
u=up stairs
Is this normal? Or am I missing something else here? Just wanted to ask around before I submit a bug report after recreating the issue. I also tried to search around a bit, but couldn't find anything resembling my issue.