VM_Thread.getCurrentThread() will only work if VM.runningVM (ie, not when writing the bootimage).

--dave