Silently ignore unregistering closed files. Fixes issue 19876. With docs and slight test refactor.
3 files changed