I have never worked in any particularly fast, so I do this:
1) Find out if there is a reasonable correction that is not related to serious rewriting. If not, then clear some time (perhaps by explaining to others how difficult it is to fix) and rewrite.
2) There is a reasonable fix without serious rewriting. Apply the fix, run the tests, check it, mark the error as fixed.
3) Now raise a new error / problem (extension request), outlining the proposed rewrite and how it will improve the code (simpler? More maintainable? Reduces communication? Affects performance or resource usage?). Assign this to yourself, CC, who cares about this bit of code.
4) Give people the opportunity to comment, and then prioritize this new mistake in my existing tasks. This usually means don't do it now, because most of the time, if I have one “correct” error to fix, then I have at least two. Do this as soon as the critical list is cleared, or the next time I need to do something that is not boring. Or maybe in a couple of days it doesn't seem to be worth doing anymore, and it won’t be done, and I saved the time that I would have spent on it.
It is important, I think, to avoid shaving the yak every time you make a small correction.
The trade-off is that if the code you want to rewrite is really bad, then rewriting is easy to redefine, and you end up spending so much time saving it that you don't have time to replace it with something that requires less service. This must be borne in mind. But no matter what priority should be rewritten, or how your organization assigns these priorities, fixing a bad design in the same area of code is not the same as fixing a one-after-one error that caused a crash, with which you originally encountered dealing with. This should be taken into account in step 1: if the project means that there are a whole bunch of other errors in the code that may be related to each other, then just fixing it is probably not "reasonable". If it really was a typo, but you accidentally discovered the possibility of refactoring, because you opened the file, and fixing it and touching anything was not "reasonable".
Obviously, the more agile your store, the more significant a refactor you can do without being so destructive / time-consuming / political that it required a separate task.