Add test for relatedModel cache.
Handle nested values better.