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.