Is this a bug in datalog symbol resolution with `not`?

Setup

(defn foo [$ attr] true)
=> #'user/foo

this works

(->> (d/q '[:find [(pull ?attr [*]) ...]
            :where
            [:db.part/db :db.install/attribute ?attr]
            [(user/foo $ ?attr)]] $)
     count)
=> 146

Introducing not fails

(d/q '[:find [(pull ?attr [*]) ...]
       :where
       [:db.part/db :db.install/attribute ?attr]
       (not [(user/foo $ ?attr)])] $)
CompilerException java.lang.RuntimeException: 
Unable to resolve symbol: $ in this context, compiling: 
(/private/var/folders/md/5r84ml295t78h14qbtd016yr0000gn/T/form-init2062554035579474257.clj:4:14)