---
cases:
  - note: fix1863/is defined
    query: data = x
    modules:
      - |
        package a.b

        # this module is empty
      - |
        package x

        p := __local0__ if { # p should be defined (an empty object)
        	true
        	__local0__ = data.a.b
        }
    data: {}
    want_result:
      - x:
          a:
            b: {}
          x:
            p: {}
