How can I make the IntelliJ Idea plugin respect sourceSet excludes?

When I generate an IntelliJ Idea project using the idea plugin, the generated iml modules don’t have the same set of excludes as the sourceSets in build.gradle files (there are only a couple of predefined excludes, but nothing related to the actual excludes used in gradle files). Is there a way to have the iml respect the sourceSet excludes?