Fix issue 12366 Range violation in compile-time regex

Back-references are not a part of "quick-test" in R-T version,
neither should they be in C-T.
Merge pull request #2171 from DmitryOlshansky/issue-12366

Fix issue 12366 Range violation in compile-time regex