I am unable to reproduce this here. For reference, the page action that threw the error is only possible by moving a thread from a non-wiki forum into a wiki forum via Thread Tools, and this tested fine for me. Looking at the code, I also can see no logical reason for the threadid to be empty.
Perhaps this is a conflict, an isolated issue related to table locking, or a vBulletin issue that was fixed in 3.8.4.