When attaching a file and the target file name differs from the uploaded file, currently it ask you if you want to replace it with the uploaded filename. I think it should be the other way around i.e. "Are you sure you want to use the "target file name" ? " confirmation. In other words, clicking "ok" would do what you expected by explicitly entering the target file name field where as right now, you would have to click cancel.
Let me know if this makes sense and if you want me to go ahead and try to make the change.