Must not wait for write batch commit if not dirty.

Fixes lock on e.g. empty transactions or transactions where keys/columns from
non-existent tables are deleted.