Merge "Fix bug #3029831 (Finalizing a Cursor that has not been deactivated or closed. database...)"