For buffers, regex-emacs.c passes arguments to the
UPDATE_SYNTAX_TABLE functions which are relative to BEGV
but the reality is that these arguments are byte offsets relative to
BEGV_BYTE whereas `offset` was counted in chars, so the two didn't
cancel each other out.