CONTRIB-4667 Correct clean up of optional labels