Fix a regression in closeView which could cause modified documents to silently disappear without asking the user.
BUG: 291091