civicrm/civicrm-core — pull request #1173 by dpradeep (2013-07-17 07:44:32+00:00)
Title: -- fixed for CRM-10146, Restricted the creation of same membership and activity again.

As per Eileen's comment, i have handled the checking downstream to stop the calling of relatedMemberships() function by checking employer id is same as the existing employer id. Introduced the new parameter as per need.