NH-3575

Cleaned dirty pull request: https://github.com/nhibernate/nhibernate-core/pull/311
https://nhibernate.jira.com/browse/NH-3575