This fixes #7529.  I messed up the wait routine so that it never waited.
This fixes #7530.
A tweak to fix some tests for bug 7526.