Ratcheting the evolution of multicellularity