title: Strange behavior while removing image from ListView
body: <p>I have a ListView which I populate with the contents of an ImageList. When an Item is selected from the list, I check if the file still exists. If it doesn't, I want to remove it both from the Image List (which is private static) and from the ListView. 
  For some strange reason, which I can't figure out, after removing the selected image from the list, the image right after it disappears and the last image in the list appears twice. 
  For example, if the list held the following images: <strong>IMG1, IMG2, IMG3, IMG4, IMG5</strong> and I remove <strong>IMG2</strong> the new list will look like this: <strong>IMG1, IMG4, IMG5, IMG5</strong>.</p>
  
  <p>Furthermore, if I select the second image from the list (which is now <strong>IMG4</strong>) and display it in some picture control, <strong>IMG3</strong>, which was supposed to be in that place will be displayed in the control.</p>
  
  <p>Any ideas what's going on here?</p>
  
  <p>EDIT:
  Populating the List view:</p>
  
  <pre><code>private static ImageList stampsImages
  
          if (stampsImages == null)
          {
              stampsImages = new ImageList();
              stampsImages.ImageSize = new Size(125, 75);
          }
  
          DirectoryInfo di = new DirectoryInfo(Globals.Directory);
          if (di.Exists)
          {
              FileInfo[] dFiles = di.GetFiles("*.png");
              int stampListSize = stampsImages.Images.Count;
  
              for (int i = 0; i &lt; dFiles.Length; i++)
              {
                  int idx = stampsImages.Images.IndexOfKey(dFiles[i].FullName);
  
                  if (idx &lt; 0)
                  {
                      stampsImages.Images.Add(Bitmap.FromFile(dFiles[i].FullName));
                      stampsImages.Images[stampListSize].Tag = dFiles[i].FullName; 
                      stampsImages.Images.SetKeyName(stampListSize, dFiles[i].FullName);
                      stampListSize++;
                  }
              }
          }
          else di.Create();
  
          for (int i = 0; i &lt; stampsImages.Images.Count; i++)
          {
              ListViewItem stmp = new ListViewItem("", i);
              lvwStamps.Items.Add(stmp);
          }
          lvwStamps.LargeImageList = stampsImages;      
  </code></pre>
  
  <p>Checking if the file still exists:</p>
  
  <pre><code>    private bool IsStampAvailable(int listIdx)
      {
          bool stampExists = true;
          string stampFile = stampsImages.Images.Keys[listIdx];
          if (!File.Exists(stampFile))
          {
              lvwStamps.Items.RemoveAt(listIdx);
              stampsImages.Images.RemoveAt(listIdx);
              stampExists = false;
          }
  
          return stampExists;
      }
  </code></pre>