### Bug description

The new version breaks the zotero.lua, which is a popular lua filter that allows to link citation to zotero in Word output.

Yaml:
```
---
title: '****'
author: 'NA'
format:
  docx:
    reference-doc: manuscript_style.docx
bibliography: /Users/A.Y/OneDrive - Harvard University/My Library.bib
csl: /Users/A.Y/Zotero/styles/nature.csl
filters: 
 - zotero.lua
---

```

```
Error running filter /Applications/quarto/share/filters/main.lua:
zotero.lua:70: attempt to index a nil value (global '_G')
stack traceback:
        [C]: in upvalue 'orig_require'
        [string "..."]:1353: in function 'require'
        zotero.lua:1716: in local 'chunk'
        /Applications/quarto/share/filters/main.lua:4073: in local 'callback'
        [string "..."]:1789: in function <[string "..."]:1787>
        (...tail calls...)
        /Applications/quarto/share/filters/main.lua:368: in function 'make_wrapped_user_filters'
        /Applications/quarto/share/filters/main.lua:15395: in main chunk
```

See also this issue https://github.com/retorquere/zotero-better-bibtex/issues/2497

And here https://github.com/quarto-dev/quarto-cli/issues/1206

Any idea how could I make it work again?

On MacOS, Quarto 1.3340

### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [ ] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
- [X] Please provide the output of `quarto check` so we know which version of quarto and its dependencies you're running.
2023-05-09T14:34:30Z
albert-ying
bug backport
closed
user filters need to access `_G`
https://github.com/quarto-dev/quarto-cli/issues/5466