Fixed a locking problem in the change-log cache

It was using the cached log object without acquiring a lock first,
in one place.