Properly track offsets for multiline regexps in Find/Replace in Files (for #8162)