adg: improve adg_path_remove_primitive() behavior