Maximum overlap, critical phenomena and the coherence of generating functions