anchor.diff:                  let (entityState, world) =
                       let oldFacetNames = entityState.FacetNames
                       let entityState = Overlayer.applyOverlayToFacetNames EntityState.copy oldOverlayName overlayName entityState overlayer overlayer
  -                    match World.trySynchronizeFacetsToNames oldFacetNames entityState (Some entity) world with
  +                    match World.trySynchronizeFacetsToNames oldFacetNames entityState entity world with
                       | Right (entityState, world) -> (entityState, world)
                       | Left error -> Log.debug error; (entityState, world)
                   let facetNames = World.getEntityFacetNamesReflectively entityState
  
positive.code:                             entityState
                          else { entityState with FacetNames = facetNames; FacetsNp = facets }
                      let entityState = Reflection.attachProperties EntityState.copy facet entityState
                      match entityOpt with
                      | Some entity ->
                          let oldWorld = world
                          let oldEntityState = entityState
                          let oldOmnipresent = oldEntityState.Omnipresent
                          let oldViewType = oldEntityState.ViewType
                          let oldBoundsMax = World.getEntityStateBoundsMax oldEntityState
                          let world = World.setEntityState entityState entity world
                          let world = World.updateEntityInEntityTree oldOmnipresent oldViewType oldBoundsMax entity oldWorld world
                          let world = World.withEventContext (fun world -> facet.Register (entity, world)) entity world
                          Right (World.getEntityState entity world, world)
                      | None -> Right (entityState, world)
                  else let _ = World.choose world in Left ("Facet '" + getTypeName facet + "' is incompatible with entity '" + scstring entityState.Name + "'.")
              | Left error -> Left error
  
          static member private tryRemoveFacets facetNamesToRemove entityState entityOpt world =
              Set.fold
                  (fun eitherEntityWorld facetName ->
                      match eitherEntityWorld with
                      | Right (entityState, world) -> World.tryRemoveFacet facetName entityState entityOpt world
                      | Left _ as left -> left)
                  (Right (entityState, world))
                  facetNamesToRemove
  
          static member private tryAddFacets facetNamesToAdd entityState entityOpt world =
              Set.fold
                  (fun eitherEntityStateWorld facetName ->
                      match eitherEntityStateWorld with
                      | Right (entityState, world) -> World.tryAddFacet facetName entityState entityOpt world
                      | Left _ as left -> left)
                  (Right (entityState, world))
                  facetNamesToAdd
  
negative.code:             then setFlag publishUpdates entity world
              else world
  
          static member internal trySetFacetNames facetNames entityState entity world =
              let intrinsicFacetNames = World.getEntityIntrinsicFacetNames entityState
              let extrinsicFacetNames = Set.fold (flip Set.remove) facetNames intrinsicFacetNames
              let facetNamesToRemove = Set.difference entityState.FacetNames extrinsicFacetNames
              let facetNamesToAdd = Set.difference extrinsicFacetNames entityState.FacetNames
              match World.tryRemoveFacets facetNamesToRemove entityState entity world with
              | Right (entityState, world) -> World.tryAddFacets facetNamesToAdd entityState entity world
              | Left _ as left -> left
  
          static member internal trySynchronizeFacetsToNames oldFacetNames entityState entity world =
              let facetNamesToRemove = Set.difference oldFacetNames entityState.FacetNames
              let facetNamesToAdd = Set.difference entityState.FacetNames oldFacetNames
              match World.tryRemoveFacets facetNamesToRemove entityState entity world with
              | Right (entityState, world) -> World.tryAddFacets facetNamesToAdd entityState entity world
              | Left _ as left -> left
  
          static member internal attachIntrinsicFacetsViaNames entityState world =
  