Fix reading array values from associated entities.

Split out conditions into temporary variables as the conditions would be
a bit batty otherwise.

Refs #4083
Merge pull request #4099 from cakephp/issue-4083

Fix reading array values from associated entities.