Extend DocumentRepository::find() with identity map check.
[GH-84] Add tests for identity map.