Query doesn't work under advanced optimizations

       (ds/q '[:find ?tx ?id ?v ?ts
               :where
               [?e :entry/value ?v ?tx]
               [?e :entry/id ?id ?tx]
               [?e :entry/ts ?ts ?tx]]
             app-db)

☝️ this query doesn't work under advanced optimizations. any ideas why?

#datascript/DB {:schema nil, :datoms [[1 :entry/id 15 536870914] [1 :entry/ts 1557849697260 536870914] [1 :entry/value {:value 1, :meta nil} 536870914]]}

is the DB for instance and that query returns #{[nil nil nil nil]}