Ensure that reference is a leaf when noAncestors is used.