I think I have a serious misunderstanding about what attachments actually are!
I had thought that attachments were the files you actually INSERTED into your post, but it turns out anything is considered an attachment that you UPLOADED while editing your post. So a file becomes 'attached' the that post if you uploaded it, WHETHER OR NOT you actually then use it in the post by inserting it's code into the editor.
Can someone please clarify if this is the case and if so, how to get around it?
If you want to know why I'm asking, it's because I'm using some custom code to pull the FIRST image attachment from a series of posts to make a slideshow. The code was working fine when I only had one image in each post, but when I uploaded some more images to some of the posts, the slideshow started showing those instead, even though I hadn't inserted them into the post editor.