fix issue while fetching cases from references
fix issue while fetching cases from references

There seems to be an issue where the case_type is not correct in indices, hence better to fetch the cases and then actually check case_type on whats fetched
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq