Sorry if it took me a while to get back to this. This isn't really a problem - as proved by this unit test:
The explanation is a very poorly named internal method - CacheLoaderInterceptor.putLoadedEntryInContainer() - which is misleading. This method is not supposed to store the entry but simply to notify listeners. (Perhaps it did store the entry once upon a time, but has since then been refactored).
The actual storage of the entry happens when the entry is wrapped for writing (CacheLoaderInterceptor line 141) which stores the entry in the caller's invocation context. The actual flushing to memory storage happens in the LockingInterceptor (in cleanupLocks()) when the call returns and locks are released. Loading from a CacheStore will inevitably involve acquiring write locks on the in-memory data structure so this is the logical place to flush writes and release locks.
Cheers
Manik
--
Manik Surtani
Lead, Infinispan
Lead, JBoss Cache