refactor(globaltocjs):  gather all namespaced expressions up front before transforming them