---
cases:
  - note: "varreferences/set: lookup: dereference"
    query: data.generated.p = x
    modules:
      - |
        package generated

        p contains [i, z, r] if {
        	x = [{}, {[1, 2], [3, 4]}]
        	y = [3, 4]
        	x[i][y][z] = r
        }
    data: {}
    want_result:
      - x:
          - - 1
            - 0
            - 3
          - - 1
            - 1
            - 4
    sort_bindings: true
