Only complain about other session if it is locked (#11757)

Change-Id: I94ff6cecc52ae79724e45bb1c246401d9521a7cf