This is probably a bug in this version of Gradle causing the excludes = in the inner scope to overwrite the egg-info exclusion from the outer scope. If so, we can work around it by moving everything to the same scope, or perhaps by avoiding the assignment operator.