The sub_commit/sub_rollback routines should be called only at the current depth.