Clean up MS SQL iterator. Fix #10115 - Fix crash on join