Fixed #17671 - Cursors are now context managers.