Why? Just make it so that as far as the machines are concerned Gorillas are a subset of humans. And then keep the actual gorillas away from them.
You've got a reasonable point for more advanced machines, but for now I'd just as soon that they also avoid squashing dogs and cats...or, pretty much anything protoplasmic over, say, 5 pounds. Or 4. Slaugher house machines don't need to be intelligent, and shouldn't be. Not until things are FAR more developed.
And, really, wouldn't you just as soon that your car avoided running over that skunk? So if you adopt a variant of the precautionary principle, you can get most of the advantages without waiting for perfection.