Gradle 7 Fail for duplicates in copy specs: Has no duplicates in project

With Gradle 7 now my copy resources task fails.
It complains about duplicate files.

I solved it by adding duplicatesStrategy = 'include' to my Copy task, after checking the Gradle 7 Release Note where this change is mentioned.

However I find it strange though, since the files it complains about has no duplicates.

> Entry application-viewer.desktop is a duplicate but no duplicate handling strategy has been set. Please refer to https://docs.gradle.org/7.0/dsl/org.gradle.api.file.CopySpec.html#org.gradle.api.file.CopySpec:duplicatesStrategy for details.

> Entry preuninstall is a duplicate but no duplicate handling strategy has been set. Please refer to https://docs.gradle.org/7.0/dsl/org.gradle.api.file.CopySpec.html#org.gradle.api.file.CopySpec:duplicatesStrategy for details.

These are files used by jpackage tool. This tool has template for these files, but they are not in my project.