Revert "Revert "Merge pull request #2594 from christianv/CLC-3813""

This reverts commit efe4b9d98101645e135c1cbde7fd1e1e069c1dbd.