Putting in explicit print statements on queries intended to correspond
to check if the problem is truly a race condition (I don't immediately
see how it could be).