Changed check re. hasChild field in HierarchyEntry from boolean to integer.