Squashed a nasty bug in the handling of herds that was resulting in
many duplicated animals in the pedigree file.