BUG/MINOR: pattern: Rely on the sample type to copy it in pattern_exec_match

To be thread safe, the function pattern_exec_match copy data (the pattern and
the inner sample) in thread-local variables. But when the sample is duplicated,
we must check its type and not the pattern one.

This is specific to threads, no backport is needed.
1 file changed