New insights on the origin of multiple stellar populations in globular clusters