I've found this SQL to restore deleted threads.
UPDATE xf_thread SET node_id = 38 WHERE node_id = 118
My missing nodes are IDs 186, 187 and 188. Their new parent needs to be 477.
ETA: The problem being, of course, that these three nodes contained a lot of threads