Fix a bug in PartSet. The replacement value needs to be zext or trunc to