This is an optimization of labelsToSignature to avoid excess allocations when the label set is empty. Change-Id: If2d59bbc3ae6d4457e2ded197b6f4e7c67e6a173
WIP - Please review but do not merge.