Issue #2221557 by DamienMcKenna: hook_entity_update wasn't creating new records when needed.