fixes #4564 - has_ancestry definition should be removed from hostgroup.
fixes #1646 - enable cloning of templates