Fixed segfaults on upward traversal; tests pass; still need AST::pos