Fix a segfault by setting the `batch_cache` pointer to `NULL` when copying a Lattice. That way the copy can get its own batch cache when needed, preventing a use-after-free.
Fix a segfault by setting the `batch_cache` pointer to `NULL` when copying a Lattice. That way the copy can get its own batch cache when needed, preventing a use-after-free.