Clearwater sctx 1334 with pullreq 1062

Changes to fix SCTX-1334: this is a duplicate of pull-request #1199