Merge pull request #1957 from dennishendriksen/master

Elasticsearch is a Indexed repository
Fix retrieving references of references of entities