40th was California NG (where you picked it I am assuming). There are a couple options here:
1. Is he wearing crossed rifle collar insignia? If so...
He most likely went over with a different unit, and either transferred to the 40th for a ride home or joined a NG unit after returning. Most of the 40th's Officers and NCOs stayed in the 40th despite it being a depot division, but after the armistice a lot of veteran officers transferred out for a ride home. You also find 40th officers who did not see combat transferring to fighting units for the Occupation (ie 3rd Div, 4th Div). There was definitely some shuffle in personnel.
Case in point:
2. Is he wearing crossed cannons collar insignia? If so...
I am not familiar with the 40th's Artillery Brigades, but if anything like the 41st's (another Depot Div) they would have been detached from the Division to provide Corps level fire support. He could have easily earned a DSC while attached to a FA Regiment if that were the case.
I would start by cross referencing WWI DSC recipients from where it was purchased, also check Waco Texas recipients. See if any served after in the 40th (or came home with the 40th). I would think that if he was only hitching a ride with the 40th, he would be wearing the unit patch for his original unit.