The patch that sent previously had the bug. It's necessary to run DFA in more narrow range without moving the `beg' pointer. The bug is fixed in this patch.