fix(library/match): memory leak that only happens with compiling with clang++