Here are the steps to reproduce this issue.
Create a Configurable Product based on Color attribute which has in my case 2 defined values Blue and Grey.
In Images section add 3 images. The first image is used as Base/Small/Thumbnail, and the other two for swatches with these Labels: Blue-swatch, Grey-swatch.
Create 2 Associated Products for each color. In Inventory section you should have Qty >0 and Stock Availability “In Stock”.
Now load the Frontend. You should see as options both colors as bellow.
- Let’s edit associated product for Grey color. Go to Inventory section and change Stock Availability to “Out of Stock”. Reload the Frontend. Now option Grey disappeared which is correct but look at “MORE VIEWS” block bellow the product image. Now there are two thumbnails instead of one. The new addition is Grey-swatch image just see its title attribute bellow.
In conclusion, if one option is not available its swatch should be excluded completely from listing in Frontend. Unfortunately Magento treats its image defined with Label format Color-Name-swatch as a product image and this is definitely a bug.
Please note if you set the associated product to Disable its swatch disappears from MORE VIEWS block. See bellow.