Fix leak of files in open_write_files when a reference in one batch of journal records causes a file to be added to open_write_files, but then a write reference followed by a close reference in the next batch needs to remove the file from both local_open_write_files and open_write_files.