We point out that for N=4 gauge theories with exceptional gauge groups G_2
and F_4 the S-duality transformation acts on the moduli space by a nontrivial
involution. We note that the duality groups of these theories are the Hecke
groups with elliptic elements of order six and four, respectively. These groups
extend certain subgroups of SL(2,Z) by elements with a non-trivial action on
the moduli space. We show that under an embedding of these gauge theories into
string theory, the Hecke duality groups are represented by T-duality
transformations.Comment: 8 pages, latex. v2: references adde