anchor.diff:                          entityState.FacetsNp <- facets
                           entityState
                       else { entityState with FacetNames = facetNames; FacetsNp = facets }
  -                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
  -                    Right (World.getEntityState entity world, world)
  -                | None -> Right (entityState, world)
  +                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
  +                Right (World.getEntityState entity world, world)
               | None -> let _ = World.choose world in Left ("Failure to remove facet '" + facetName + "' from entity.")
   
  -        static member private tryAddFacet facetName (entityState : EntityState) entityOpt world =
  +        static member private tryAddFacet facetName (entityState : EntityState) entity world =
               match World.tryGetFacet facetName world with
               | Right facet ->
                   let entityDispatchers = World.getEntityDispatchers world
  
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:                 let (entityState, world) =
                      let oldFacetNames = entityState.FacetNames
                      let entityState = Overlayer.applyOverlayToFacetNames EntityState.copy oldOverlayName overlayName entityState overlayer overlayer
                      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
  