CRM-13652 - Fix relationship api to process related memberships