Fix denaming under presence of name hiding

Used to erroneously stop incrementing other names when new name was
overwritten (if same name was present in surrounding scope).