IDA names unrelated values whithin one function

Tried to name a -1 as INVALID_HANDLE_VALUE. The value got named in the whole function body despite I only selected one location and it doesn’t make sense in other locations. I am a recent user of IDA, but I guess this is a bug. IDA Free 9.3.260213

ida_OeRaGStj0l

it’s difficult to say for sure without the binary, but most likely there is one constant in the assembly which is reused in the function. Unfortunately, currently the enum conversion is tied to the assembly, so each conversion affects all uses.

Please make it so that name binds only to one place in assembly/decompiled C. It is very frustrating to not be able to annotate constants as you go through the code since one rename may affect usages elsewhere and confuse you later on