MDL-39024 fix MSSQL seek past the end of recordset