upipe_sws_thumbs: fix buggy flush

Unset forced flush even if gallery == NULL.
fix corner cases for systime rap