I got around the problem eventually, and now have mobile zerobots with a whopping 382 genes.
There seems to be a strong trend towards decreasing DNA length as time goes on: This 382-gene bot, for example, has a DNA length of 7926, which is only 59% of what the zerobots originally started with.
I've made several modifications to the shepherds as the zerobots evolved.
After the zerobots evolved powered movement, I changed the shepherds to spread out at about tie distance and then sit in place. When a bot gets within tie range and the shepherd deems it ready for analyzing (or destroying), the shepherd ties to it and immediately immobilizes it. Then it performs its scans and rewarding, or kills the bot. If it isn't being killed, it may be reproduced, but the shepherd sets the bot's fixpos to 0 on the cycle before making the bot repro (If it repros while fixed in place, the offspring will also be fixed in place).
I also improved the code that controlled killing bots, particularly in regard to viruses, unified the two shepherd genes, made having more than 1 gene be a trigger for apoptosis, and changed the apoptosis mechanisms to be more robust (they were failing when the shepherd had enough energy to get both venom and poison up to 32000).
The shepherds are also now selecting for higher values of trefeye, treating an increase of 1 in trefeye as being equivalent to an increase of 10 genes.
The bots have evolved some interesting behavior, but nothing overtly conditional - they fly foward, they shoot info shots (but this is due to a bug - the code that does it is '1 7 0 store store'), and they always fly in the same direction (although I have seen the direction change due to mutation - just not due to a condition).
They also managed to - in two separate sims - disable all the shepherds by setting all their memory locations to random values. I'm not certain if they accomplished this with info shots or viruses, but judging by the fact that a few of the shepherds were missing genes or had a duplicate gene, and that I found one shepherd with a zerobot gene, and that all the bots had acquired the main shepherd gene, I presume it was likely to have been viruses. That was the reason for the improvements to anti-viral stuff, combining the shepherd genes, better virus-making-bot-destruction, and apoptosis (Having the copyingFinished memory location randomized now triggers apoptosis instead of making the shepherd's genes stop running). Once I had made those improvements, I restarted the sim with an older version of the bots which lacked the stolen shepherd gene.
P.S. In the time it took to write this post, the bots went from being 378-382 genes with 3 eye references to being 382-385 with 4 eye references. That's how fast the shepherds can accelerate evolution, even though it's only running at 1.8 frames per second right now (with 106 bots, 81 shepherds, smallest map size, dynamic costs enabled and set to 100).