Fix wrong thread id when resuming after interrupt

Who knows what kind of havoc this was causing.  I think this was causing #2553, but even if it wasn't, it's wrong.

-[Unknown]