Fix race condition in smooth image swapping code.