Correct cast_from_entity_to_role. Replace cast_from_entity_to_all_roles with more versatile cast_from_entity_to_roles.