Fix a problem with CancellableAcquire being delayed.

Also, add a regression test for this problem.
Thanks to Tad Glines for finding the problem.