Fix InstanceIdentifier.getAncestor() implementations