Revert "Close even if the target buffer has not been loaded yet"

This reverts commit 7b14e4e05e6b38ed8deecd89ac8ab686fa80f844.