Fix bug in memcached key generation