Fix deep associations being hydrated incorrectly.

Fix deep associations that involve non-joinable relations from being incorrectly hydrated.

Fixes #4804