fix invalidateAndMapBufferForWriting to use proper buffer invalidation flag
in a bind