Temperature-induced local moments in FeSi and CoS2