Changed: detectAttributedTree -> detectTypecheckedTree