Moved transaction boundary to cover used-by tests on deletion so that the database...