MNK-5363: backport fix from trunk

git-svn-id: http://svn.terracotta.org/svn/ehcache@7845 b9324663-ca0f-0410-8574-be9b3887307d
MNK-5363: backport fix from trunk

git-svn-id: http://svn.terracotta.org/svn/ehcache@7846 b9324663-ca0f-0410-8574-be9b3887307d