Fix issue in substitution confirm.  It was only keeping track of the
original endOffset and not taking into account changes in length after
performing replacements.