Fix for #3198
Also addresses #5092 in part
Merge pull request #3198 from ralphschindler/hotfix/3198

Limit/offset doesn't work properly when using parameters and SQL Server drivers
Merge branch 'hotfix/3198' into develop

Close #3198