Fastlane randomly installs bundle twice

Hi, I keep noticing how many of my ios builds fail due to fastlane’s attempt to copy a bundle file more than once. Here is the the exact error:

:x: error: remove /Users/distiller/Library/Developer/Xcode/DerivedData/MyApp-gdxhwgvlzauqkchkbyrlwuckgsih/Build/Intermediates.noindex/ArchiveIntermediates/MyApp/InstallationBuildProductsLocation/Applications/ Directory not empty

I can’t reproduce this outside of the CI environment. The problem is also intermittent which makes me very confused. What is this dependent on?

Any ideas?