Reproduction path, tested in both CMS 12 and 11:
- Open two documents (A & B), both in edit mode.
- Change the title of document A.
- Click 'close all' and then 'Discard all'.
- Log out
- Log in (with same user)
Expected: no documents are open
Result: document B is open