Incorrect hinting when switching docs back and forth

When a document is opened for the first time, hints would be correct.
When opening another document and coming back to the previous document,
hints would be incorrect.