Replaced getParent() cascade with findAncestor().