vba: catch lookback beyond buffer.

The buffer is used in a wrap-around way, but we should not allow lookbacks
to go beyond the initial window.