Packaging intermittently fails cross compiling on 5.2.1 for dedicated server

We recently upgraded to 5.2.1 (from 5.1) and now server build intermittently hang indefinitely. It seems to be related to the shard compilation job. It hangs on seeming to be done with the job as there are no shaders to compile.


================================================
LogShaderCompilers: Display: === FShaderJobCache stats ===
LogShaderCompilers: Display: Total job queries 0, among them cache hits 0 (0.00%)
LogShaderCompilers: Display: Tracking 0 distinct input hashes that result in 0 distinct outputs (0.00%)
LogShaderCompilers: Display: RAM used: 240.00 B of 6.40 GiB budget. Usage: 0.00%
LogShaderCompilers: Display: === Shader Compilation stats ===
LogShaderCompilers: Display: Shaders Compiled: 0
LogShaderCompilers: Display: Jobs assigned 0, completed 0 (0.00%)
LogShaderCompilers: Display: Time at least one job was in flight (either pending or executed): 0.00 s
LogShaderCompilers: Display: ================================================

I added in this change to no avail https://github.com/EpicGames/UnrealEngine/commit/a3e8a1d2fc08c04186ca2924f7b4bc20b0d46590

It hangs more than 50% of the time so I think there is a race condition.

Does anyone have an idea of what could be causing this?