This seems to both loop over the parent chain and call itself recursively, why?