NH-3596 - DistinctRootEntityResultTransformer breaks Cache

https://nhibernate.jira.com/browse/NH-3596
Fix and unit test