Problem/Motivation
Adding a media Image file from Media Browser inserts a wrong image when default caching is enabled.
Steps to reproduce
1. Enable Media and Media library modules.
2. Create a new Media field or use an existing Media field
3. Add a Content containing this new media field.
4. Add Media and then insert a new image.
5. Unselect the new image from image list and then use any filter to media.
6. Select a different image and then Click Insert Selected.
7. Wrong image is insert. This issue is not happening when caching is disabled.
Proposed resolution
We should not cache previously selected image id or clear the id.