[DDC-2310] Fix regression introduced in SQL Server lock handling.
Merge branch 'DDC-2310'