I way contemplating on removing the copying of labels but I decided to leave it as is due to this warning.

As far as I know, `unique` returns a new array so the changes should be safe.