Make removeFromParent throw if the right session is not locked (#13473)

Change-Id: Id5ef40db07404d7cb41b26768d18e757b8cae2b3