How selfish is Dictyostelium slug formation?
Joan Strassman's work is probably the route to go for this.

The short of your answer is that several things mediate who ends up where in the slug:


  Cheaters are limited from exploiting other
  clones by high relatedness, kin discrimination, pleiotropy, noble
  resistance, and lottery-like role assignment.


Here's the most relevant paper:

Strassmann, J. E., &amp; Queller, D. C. (2011). Evolution of cooperation and control of cheating in a social microbe. Proceedings of the National Academy of Sciences, 108(Supplement 2), 10855-10862. [pdf]