Let's discuss the situation where the team did not create the defect in the first place. Maybe the team inherited a system that was full of technical debt. The answer here is easy, the team should get story points for that.
But if the team is responsible for the defect? If they can't apply any story points for the fix then how do they identify the work and plan accordingly? On the flip side, if they are apply story points then aren't they receiving the points twice?