Role of heavy quarks in light hadron fragmentation