Try to ensure the target model on an extract query clause is a patient/episode subrecord, not a similarly named lookup list.

refs openhealthcare/elcid#225
Debugging print on error for extract download