Fixed issue using whereHas with HasManyThrough Relationship

Fixes issue #3560

This PR fixed my issue, however I'm worried line 81 might cause issues if the parent key doesn't follow conventions. Any comments?

```
$key = $this->wrap($parentTable.'.'.$this->farParent->getForeignKey());
```