kbx: Fix an endless loop under Windows due to an incomplete fix.