Fix incorrect auto-completion suggestions

fixes #7378