The point is that it doesn't recognize that the two classes are the
same, nor does it even recognize that the class generated by
ConjugacyClass is a class (in the list g.conjugacyClasses) at all.
This is bug in 3.1 which is fixed in 3.2:
gap> g:=TwoGroup(8,4);;
gap> ConjugacyClasses(g);;
gap> t:=ConjugacyClass(g,g.3);
ConjugacyClass( Group( a1, a2, a3 ), a3 )
gap> g.conjugacyClasses[2];
ConjugacyClass( Group( a1, a2, a3 ), a3 )
gap> t = g.conjugacyClasses[2];
true
gap> Position(g.conjugacyClasses,t);
2
gap> VERSION;
"Version 3 Release 2"
best wishes
Frank Celler