I talked about communication when people do pair-programming. For a while now, there's been some trepidation in the team when holding people accountable. People seem to have difficulty knowing how to hold someone else accountable. It's a communication problem. People are so worried about being seen to blame someone for something that they'd rather avoid the conversation completely. The problem with this approach is that the things that shouldn't be happening keep happening because the people doing them don't know they shouldn't be doing them.
Deal with the root cause. Have a conversation and hold the person accountable.
To me, the difference between blame and accountability is language and delivery. Here's a couple of examples:
"That code you wrote to do thingamyjig is rubbish. It's causing all sorts of problems."
Here you're assigning blame, which can be exaggerated with intonation and gesture.
"You know that code you wrote to do thingamyjig? I think there might be a better way to do it. Can we sit down and try refactoring it? I'd like to show you what I'm thinking and get your feedback on it."
Here, on the other hand, you've approached the person, offered to help improve the code and created a learning opportunity for him (and probably for you too) that will help address the root cause and prevent it from happening in the future.