handle ThreadMigrating in throwTo() (#4811)