On the role of extinction in failed gamma-ray burst optical/infrared afterglows