NH-3455 fix

#### Not ready for merge
Bug fix for https://nhibernate.jira.com/browse/NH-3455