@peti I've determined that the hang which this fixes does not happen all
of the time (in fact, I've been using ghc-mod for weeks without seeing
it once). But today it happened again, and it made me realize I had
undone this patch locally. I'm committing it now because it fixes the
problem completely for me, and certainly cannot hurt.