Waste and Welfare in a Model of Endogenous Technical Change