NH-3710

https://nhibernate.jira.com/browse/NH-3710
Fix with unit test. SQL contains locks as it should.