The scene-wide Gap Jumps save check found a stale allocation bitmap in EntityFactory. The serializer restored occupied entities and a cached next index, but retained freeEntities from the later live execution. The first allocation could look correct, then the next skipped a free slot or reused a restored occupied slot.
Deserialization now initializes a free bitmap, marks restored entities occupied, and recomputes the first-free cache. The old cache integer is consumed, preserving the stream layout; no serialized bitmap is added. Target-name sets are cleared before loading, and shared groups keep their entity field/membership synchronized through rename, clear and removal.
Clearing a level also resets the allocation bitmap, rather than retaining occupied bits from its previous entities. A regression recreates entities after clearing and checks that slots 0, 1, 2 and 3 are available in order.
Tests cover repeated rewinds after future allocations, removal of a saved entity, target memberships and group mutation. Native frame-506 replay checks IDs and states of newly spawned dash effects along with player/camera motion and RNG. The dash smoke now retains index 70 rather than changing to 71. This establishes same-build observable restoration, not every historical state’s compatibility.