LRU cache cleanup fixes. Managed file reference counting fixes.