Fix bug when variable changes in the function, it disappears in the
completion.