Throw error when ``from`` and ``to`` lengths differ in ``Replace``.