Merge "Add back the throwIfParentInstance checking in getAffiliationIds" into oc-dev