Defect compensation in doped CVD amorphous silicon