If there was some kind of selection pressure which favoured, even in a roundabout way, predisposition toward religion, and if sexual selection naturally favours successful people (or those who exude success, anyway), then we have a (not too serious) quandary. Because the most high-profile adherents, the most apparently successful at religion, are often the clerics. Who are frequently celibate (or at least, are required to be: please do read the dictionary definition for nepotism though).
OOP the Easy WayObject-Oriented Programming the Easy Way: a manifesto for reclaiming OOP from three decades of confusion and needless complexity.
From what I understand the practice of clerics being celibate was not always the case for those religions that advocate it. It’s also not a universal concept within different sects of religions.
So when religions were starting celibacy may not have been an issue. In any event I think that kin selection could explain any issues, in much the same way as it can explain individuals who look after others children.
Considering the "moth to a flame" analogy, I think some basis in group selection is plausible. The clerics help to unite the tribe, provide impetus to slay the other tribes and advice or support. But then as you say it might just come late enough to the game that it’s about conscious decisions not some selection pressure – I know that in some circles of Judaism the rabbi is a hereditary role, such as in the Hasidics.
There are 2 articles in this weeks Science that might interest you. Both are on the evolution of cooperation. One is a review article and the other a perspectives piece. The review abstract is at the URL below. It has a link to the perspectives article. Not sure if these are available without subscription access.