blob: fix flag handling in prepare/plain_write