virgl: add extra checks in virgl_res_needs_flush_wait