This case is easiest to understand:
The bird flies at 180° until x = 20.
Then she flies at 270° until she has the worm (during this flight x remains at 20, so the first condition doesn't apply).
Then she flies at 90° until y = 60 (during this flight x remains at 20, so the first condition doesn't apply, and she has the worm, so the second condition doesn't apply).
So far so good.
Now the bird has the worm, x = 20, y = 60. Thus the first three conditions don't apply, and so the fourth condition matches and she flies at 0°. The moment she does so though, x becomes 21. Now the first condition (x > 20) takes effect, causing the bird to fly back at 180°. That's why the bird spasms back and forth, she's alternating between the first and fourth conditions.
Changing the first condition to be more specific will prevent it from applying later on:
This gets the bird further along, but she then gets stuck with the "y < 60" condition intended for flying away from the worm, since that also applies when she flies towards the nest. The solution is the same, just make the condition you don't want to apply more specific so it doesn't apply later on:
Hope this helps. The frantic twitching you are seeing is called an "emergent behaviour". Nowhere in your program does it say to stop flying and twitch. But the sum of the conflicting conditions create this unexpected pattern.
--