Hi,
This may not be a bug, but it is certainly a very important validation that should happen for duplicate attachment post-slug when editing and adding Media, just like there is a validation on Edit Page/Post page.
I spent half the day trying to figure out why my page was displaying images everywhere where apply_filter('the_content' ...) was called.
It turns out I had an attachment with the same post slug as a page, so the attachment page was being displayed instead of the page I was looking for.
The solution was simple: either change the page post-slug or the conflicting attachment post-slug, but tracking down the problem was very difficult.