oracle provider: fix closing of iterator in case of error