Handle a crazy race condition. See comment for details.