Fixed bug in M2M and L2L caching.