A record is found after loading its id through a hasMany relationship.

As we have now a reference for records in a hasMany relationship,
we need to make sure we load them when accessed. If the record is
`UNLOADED`, we materialize the record.

[Fixes #869]
Merge pull request #883 from Cyril-sf/has-many-bug

A record is found after loading its id through a hasMany relationship.