Valid point. I think the other problem we have when talking about the evolution of religion is that we tend to view religion as a thing rather then a wide variety of many things, some of which are not even as closely related as we think.That's very true. In order to posit that religion evolved to promote social cohesion, one would need, I think, to show how animism promotes social cohesion. That is, animism -- or something similar -- is probably the form religiosity took for at least hundreds of thousands of years (and possibly even millions of years) prior to the rise of more familiar kinds of religiosity.
I would not posit that religion evolved to promote social cohesion (and I dont think anyone is saying it is that simple or absolute). But still I would suggest that social cohesion did play a role in the evolution of certain elements that we today group under the umbrella of evolution.