ZN domains in gauge theories with fermions at high temperatures