Fix problem with duplicated files similar to MDL-37934