It's not closed as part of the assert, it's closed as part of alter_field, add_field and remove_field. It's the only way; the cursor will otherwise be wrong for any query issued on it previously, and that might affect any number of things we can't predict.

Bear in mind this only triggers on Oracle, which doesn't have transactions around DDL statements anyway, so we've already implicitly committed everything.