Fix non-temp reply queues, and add a test.
Merged bug25564 into stable