[MNG-5456] Incorrect exception handling in parallel build