Electronic effects on defect behavior in semiconductors