Fix some problems with the bug9002 fix.

Fixes bug 9090; bug not in any released Tor.