fix ISPN-2654 NPE in CacheStatement when no cache is in session