CXX-175 ensure bulk operation executed if write fails

`_executed` should be moved before our call to `_write()` so that if the write fails and throws we still cannot execute the operation twice.