Fix 588-Window menu doesn't remove a closed document