NXP-14440: Invalidate cache when locking/unlocking the current Document.
NXP-14440: Correction for a better readibility.