Fix issue 12713 std.regex.regex crashes with SEGV, illegal instruction r...

...esp. assertion failure with certain bad input