LRU implementation: code improvement on finding keys in hashmap.