Fix `files_to_run` so that setting `pattern` after it was already accessed.