Compare NHibernate's scope and parent scope based on key instead of type.

Comparing on type is useless because it's always ISession.