Firstly paste the following code:
\documentclass{article}
\newcommand{\abc}{1}
\newcommand{\abc}{1}
\begin{document}
\abc
\end{document}
Observe that the syntax highlighter does not highlight the \abc in Line 5 in red, which is the expected behaviour.
Then, delete the third line, and the code should now look like:
\documentclass{article}
\newcommand{\abc}{1}
\begin{document}
\abc
\end{document}
Observe that now the syntax highlighter treats \abc as undefined by highlighting it in red, which is not the expected behaviour.
I don't think we keep track of duplicate definitions, which is an edge case and would make the code more complex. As a workaround, you can update the internal state using Idefix -> Refresh Structure.
duplicate definitions are not tracked. You can add it again by editing the remaining line with the definition (add a space)
very low priority