Fix race condition in process_some_tiles