I've never really seen that. What I've seen is the much pragmatic take of marking the source code with a few comments to highlight the problematic areas and then goes on with the implementation. Refactoring can always be done later when the first batch of value has been extracted.
There's always tradeoffs to balance and perfection is something you inch towards, not something you get done in one go.