No warning when renaming to a special name used by Geogebra
I think the title explains well the reason for the problem and how to fix it.
As for the possible outputs of this situation I can't be exhaustive.
In the first attached file a segment has been renamed "Line" and there is also a line called f whose definition is "Line(C, D)". If you try to change this definition to "Line (C, A) then f turns into a number with the definition "Line(C)".
Similar bugs can be triggered using different methods, in some cases once one line have already been turned into a number it can be enough to just select a line, display its settings, click in the definition field without changing anything and then click elsewhere to turn this line into a number.
I joined a second file to show similar bug with the command "Midpoint". To trigger the bug load the file "Rename bug 2" then try to change the definition of the point C from "Midpoint(A, B)" to "Midpoint(A, D)" and then C becomes an undefined object with the definition "Midpoint(A)".
I guess any command used by Geogebra can lead to similar bug.
As for a possible treatment for this problem as I suggested in the title maybe Geogebra should display a warning message when renaming to a special name with a special meaning for Geogebra. That's the idea that came to me from the point of view of a Geogebra user.
But that's just a suggestion, I am no programmer and furthermore I don't know the internal structure of Geogebra's functioning. Maybe that idea might be difficult to implement, maybe it might get the software slower, maybe there are other ways to prevent such bugs with a better pros/cons situation.