The only time duplicated code is bad is when there is an actual logical requirement for the multiple instances of duplicated code to be the same. Like some actually underlying concept linking the duplicated code sections that is worth abstracting.
That is not always the case. Just as often IME the situation is actually, "these two things happen to have the exact same behaviour right now." It's important to recognize that there may be no guarantee that will be the case *in the future*.
If the reason for the duplicated code is just coincidence, let the code be duplicated. You'll give the duplicated code sections freedom to drift apart naturally as requirements change and save yourself the trouble of having to decouple things later.