Fix threading issue I'd unwittingly introduced.