Fixes in is_restriction_of? and restrict for HierarchyType