Spiral galaxies might have been lentil-shaped before becoming starry whirls