This is still a problem even with a named SessionFactory.
There is a simple fix. Removing ComponentType.typeScope (which is not used) fixes it.