The angel said to those who were standing before him [Joshua], "Take off his filthy clothes." And to him he said, "See, I have taken your guilt away from you, and I will clothe you with festal apparel" (Zech 3:4, NRSV)
As with many texts in Scripture, this shows that one should not understand passages that speak of clothing as evidence for imputation; instead, the clothing of Joshua was an outward sign of an inward reality preceding from the change of clothing, that is, the removal of his guilt.