CRM-15201 fix case get related contacts query
Merge pull request #3994 from lcdservices/CRM-15201

CRM-15201 fix case get related contacts query