Layer material change name bug

There’s a bug in material handling, if I assign a material to a layer, and then the same to another, and then edit the material and rename the material, then the names are not updated in layer manager:

In the above picture I got the right name to show on the selected layer by first assigning a new material, then reassigning the material with the new name. On the other marked layer you can still see the old material name.

Hi Jorgen, thanks, I see something is not right there.