Don't close the stream when caching metadata references
- Keep the stream open until we dispose the metadata itself
- Change the cache to dispose entries if the old value is disposable
Removing dependencies from shared project