Fix revision creation when the entity id is not set.