**quarto-version: 0.9.279**

I am having an issue creating a shiny runtime document.
There seems to be an issue with attaching packages.

In the example below,  with `#| context: server` included in the first chunk, rendering fails with the error

```
Quitting from lines 19-20 (test.qmd) 
Error in mutate(., waiting = waiting) : could not find function "mutate"
Calls: .main ... withVisible -> eval_with_user_handlers -> eval -> eval -> %>%
```

However, I only added the context because without it, the doc renders, but shows the error

```
Error: could not find function "ggplot"
```

The console prints

```
Loading required package: shiny

Warning: Error in ggplot: could not find function "ggplot"
  172: renderPlot
  170: func
  130: drawPlot
  116: <reactive:plotObj>
  100: drawReactive
   87: renderFunc
   86: output$distPlot
    5: <Anonymous>
    3: rmarkdown::run
    2: run
    1: .main
```

**Example**

````
---
title: "Untitled"
format: html
server: shiny
---

```{r}
#| include: false
#| context: server
library(dplyr)
library(ggplot2)
```

```{r}
plotOutput("distPlot")
```

```{r}
mutate(faithful, waiting = waiting)
```

```{r}
#| context: server
output$distPlot <- renderPlot({
   ggplot(faithful, aes(waiting)) +
    geom_histogram()
})
```
````
2022-04-19T15:45:45Z
jmcvw
closed
Problem loading packages with server: shiny
https://github.com/quarto-dev/quarto-cli/issues/686