Yes.
I'm not an expert, but I can imagine that shifting may be compromised by the cable routing or worse yet, steering might be restricted causing an accident. If it's fine, only you can be the judge.
I I were to reroute the cables, I would shift the lower derailleur to the smallest cog...