Don't leak memory when encountering unknown match or target