Backport CableUtils optimisations to master branch