A nit; DRY is probably not what you think it is. DRY is basically the same as SRP, framed differently. In SRP, it's totally valid to have the code twice if it has different meaning from a user pov.
(https://softwareengineering.stackexchange.com/questions/2207...)
"Byte for byte equivalent" doesn't necessarily mean it's a copy, if the semantics of it are different.