Parent/child: If _parent field points to a non existing parent type, then skip the has_parent query/filter

Closes #7362
Closes #7349