SCTX-1613: Import patches to resolve SCTX-1613

These patches are to be merged into cw-sp1-lcm when Shiva wants to package them into a hotfix. 
These are part of the fixes that are required to resolve SCTX-1613 and not introduce SCTX-1846.