 (defn excluded?
   #?(:cljs {:tag boolean})
   [env sym]
-  (if-not (nil? (get-in env [:ns :excludes sym]))
+  (if-not (nil? (gets env :ns :excludes sym))
     true
-    (not (nil? (get-in @env/*compiler* [::namespaces (get-in env [:ns :name]) :excludes sym])))))
+    (not (nil? (gets @env/*compiler* ::namespaces (gets env :ns :name) :excludes sym)))))
 
 (defn used?
   #?(:cljs {:tag boolean})
   [env sym]
-  (if-not (nil? (get-in env [:ns :use-macros sym]))
+  (if-not (nil? (gets env :ns :use-macros sym))
     true
-    (not (nil? (get-in @env/*compiler* [::namespaces (get-in env [:ns :name]) :use-macros sym])))))
+    (not (nil? (gets @env/*compiler* ::namespaces (gets env :ns :name) :use-macros sym)))))
 
 (defn get-expander-ns [env ^String nstr]
   (cond

  "Is sym visible from core in the current compilation namespace?"
  #?(:cljs {:tag boolean})
  [env sym]
  (and (or (get-in @env/*compiler* [::namespaces 'cljs.core :defs sym])
           (when-let [mac (get-expander sym env)]
             (let [^Namespace ns (-> mac meta :ns)]
               (= (.getName ns) #?(:clj 'cljs.core :cljs 'cljs.core$macros)))))

               (when (not= (-> env :ns :name) full-ns)
                 (confirm-ns env full-ns))
               (confirm env full-ns (symbol (name sym))))
             (merge (gets @env/*compiler* ::namespaces full-ns :defs (symbol (name sym)))
                    {:name (symbol (str full-ns) (str (name sym)))
                     :ns full-ns}))

