I create a new page with a title "Test Page", which is not published yet. I insert an image into that page with a file name "test-page". When I publish the page, it is always beeing redirected from example.com/test-page/ to example.com/test-page/test-page/.
In the developer console I can see "x-redirect-by: WPML".
I have also installed Yoast SEO (and WPML SEO), which redirects the attachment URL to the media itself, when uploading a new image.
I couldn't recreate my problem. The problem with the duplicate URL part seems to occur the other way around here. While creating a page with a title "New Test" I upload an image with a filename "new-test.jpg". When I click on that image in the media library and click on "View attachment page", the url looks like that:
I did a few more tests and was able to recreate the problem after all:
hidden link
1. create a new page
2. enter a title (e.g. "Service")
3. insert an image with the file name "service"
4. publish the page via the "Visibility" setting to "private" and click on "view page"