Fixed #7965: Javascript errors on editing labelsets