---
cases:
  - data: {}
    modules:
      - |
        package generated

        p[x] {
          i = {1, 2, 3, 4}
          j = {1, 2, 99}
          j[x]
          i[x]
        }
    note: "varreferences/set: ground var"
    query: data.generated.p = x
    sort_bindings: true
    want_result:
      - x:
          - 1
          - 2
