Lock copying to STAGING_DIR_ROOT. This fixes build failures for parallelized build.