Fixed a problem with automatic sub-class generation for roles.