bugfix: only print each gene once

The bug was when writing multiple homologies sharing some genes
(e.g. all the orthologues of a query gene), the writer was printing
those genes multiple times.