Slight adjustment to the logic that determines what program files should be kept in memory when files are closed.