do not try to upgrade subtrees of non-element nodes
slightly better scoping in loader
fix dumb bug