Fixed handling of entity types with no keys e.g. Service Document.