---
cases:
  - data:
      a:
        - 1
        - 2
        - 3
        - 4
    modules:
      - |
        package ex

        indexed {
          data.a[0] = 0
        } else = 2 {
          data.a[0] = 1
        } else = 3 {
          data.a[0] = 1
        }

        indexed {
          data.a[0] = 1
          data.a[2] = 2
        } else {
          false
        } else = 2 {
          data.a[0] = x
          x = 1
          data.a[2] = 3
        }
    note: elsekeyword/indexed
    query: data.ex.indexed = x
    want_result:
      - x: 2
