lib/re: prevent allocating `native_match` only to free it