[OE-3987] fixed many-many relations returning the same record more than once