Don't queue Flush() etc. while on GPU thread.

Oops, that makes it not actually flush properly of course.

Also made a simpler guard wrapper to avoid extra braces in too many
places.  Reduced contention areas slightly.