Fixed RC_ON_LOCKED and LOCK_ON_OPEN when opening another file in the same