This issue is related to
NH-2673
Closed
which corrects a similar exception when persisting a query to cache. However when the query is retrieved from the cache a similar exception occurs because only the Put and not Get of the caching system was fixed.