v3d: Fix an invalid reuse of flags generation from before a thrsw.