Fix crash caused by incorrect array access in symbolic regex implementation