[MoarVM] use index to speed up scanning in regexes