Let's go step by step...
We have 10 skeletons, the game checks their angle each tick. Say at the tick 3581 there are currently 5 skeletons facing right.
Okay, five skeletons have angle of 0, so those are picked. Next, we check for those skeletons if there is terrain 10 pixels away from them. Four skeletons meet that condition, so they move at set speed.
Now, there is ELSE condition, which picks CURRENTLY PICKED skeletons. Those are the ones that match the desired angle, so it turns them all, no matter whether they met the terrain overlap condition or not.
We want it to pick the skeletons that have no terrain ahead of them, so it picks THOSE skeletons. Thus, we have to make it an exact condition: Is NOT overlapping terrain at offset. That correctly picks the one skeleton who is about to fall off and turns him around.
If you have a clear idea which instances should be picked at any moment, it makes things easier ELSE doesn't pick anything, the PARENT condition picked instances are counted here. Perhaps if you kept the ELSE and added the "Not overlapping terrain at offset" condition there, that would work, as it would properly filter picked instances. But in this case, ELSE is not necessary, as we already have a condition that filters the stuff.
I hope I have been clear enough