fix #564: check if parent id is already here