Fix a possibility for out of bound accesses in logging within Cache.cpp

The way they currently were, pCache could be accessed with a negative index.