diff --git a/src/framework/DeclManager.cpp b/src/framework/DeclManager.cpp
index 0d3f476..7889818 100644
--- a/src/framework/DeclManager.cpp
+++ b/src/framework/DeclManager.cpp
@@ -217,6 +217,9 @@ public:
 	int							numLines;
 
 	idDeclLocal *				decls;
+
+private:
+	bool						TryReplaceQ4WebReplayAnchor( idDeclLocal *decl, declType_t type, const idStr &name );
 };
 
 static bool DeclManager_IsopenQ4OverrideDeclFile( const idDeclFile *sourceFile ) {
@@ -260,6 +263,47 @@ static bool DeclManager_IsStockMaterialRedeclaration( declType_t type, const idS
 	return false;
 }
 
+/*
+===================
+idDeclFile::TryReplaceQ4WebReplayAnchor
+
+The free runtime reserves the historical entityDef index used by server demos.
+The first retail declaration supplies the actual projectile body without
+allocating a new declaration or changing that index.
+===================
+*/
+bool idDeclFile::TryReplaceQ4WebReplayAnchor( idDeclLocal *decl, declType_t type, const idStr &name ) {
+	if ( decl == NULL || type != DECL_ENTITYDEF || name.Icmp( "impact_napalm_projectile" ) != 0 ||
+			decl->sourceFile == NULL || decl->sourceFile == this ) {
+		return false;
+	}
+
+	idStr previousFileName = decl->sourceFile->fileName;
+	previousFileName.BackSlashesToSlashes();
+	idStr currentFileName = fileName;
+	currentFileName.BackSlashesToSlashes();
+	if ( previousFileName.Icmp( "def/weapons/00_napalmgun_openq4.def" ) != 0 ||
+			currentFileName.Icmp( "def/weapons/napalmgun.def" ) != 0 ) {
+		return false;
+	}
+
+	idDeclLocal **sourceLink = &decl->sourceFile->decls;
+	while ( *sourceLink != NULL && *sourceLink != decl ) {
+		sourceLink = &( *sourceLink )->nextInFile;
+	}
+	if ( *sourceLink == NULL ) {
+		common->FatalError( "Replay anchor '%s' is missing from its source-file list", name.c_str() );
+		return false;
+	}
+
+	*sourceLink = decl->nextInFile;
+	decl->nextInFile = decls;
+	decls = decl;
+	decl->sourceFile = this;
+	decl->needsPrecache = false;
+	return true;
+}
+
 class idDeclManagerLocal : public idDeclManager {
 	friend class idDeclLocal;
 
@@ -1046,6 +1090,8 @@ int idDeclFile::LoadAndParse( bool unique ) {
 			// update the existing copy
 			if ( newDecl->sourceFile == this && !newDecl->redefinedInReload ) {
 				referencedThisLevel = newDecl->referencedThisLevel;
+			} else if ( TryReplaceQ4WebReplayAnchor( newDecl, identifiedType, name ) ) {
+				referencedThisLevel = newDecl->referencedThisLevel;
 			} else {
 				if ( !DeclManager_IsopenQ4OverrideDeclFile( newDecl->sourceFile ) &&
 						!DeclManager_IsStockMaterialRedeclaration( identifiedType, name, newDecl->sourceFile, this ) ) {
@@ -1262,18 +1308,28 @@ int idDeclFile::LoadAndParse( idFile *file ) {
 		declManagerLocal.EvaluateInlineGuide( name, declDefinition );
 		int sourceTextLength = src.GetFileOffset() - startMarker;
 
+		bool referencedThisLevel = false;
 		idDeclLocal *decl = declManagerLocal.FindTypeWithoutParsing( identifiedType, name, false );
 		if ( decl ) {
 			if ( decl->sourceFile != this || decl->redefinedInReload ) {
-				if ( !DeclManager_IsopenQ4OverrideDeclFile( decl->sourceFile ) &&
-						!DeclManager_IsStockMaterialRedeclaration( identifiedType, name, decl->sourceFile, this ) ) {
-					src.Warning( "%s '%s' previously defined at %s:%i",
-						declManagerLocal.GetDeclNameFromType( identifiedType ),
-						name.c_str(),
-						decl->sourceFile ? decl->sourceFile->fileName.c_str() : "*unknown*",
-						decl->sourceLine );
+				if ( !TryReplaceQ4WebReplayAnchor( decl, identifiedType, name ) ) {
+					if ( !DeclManager_IsopenQ4OverrideDeclFile( decl->sourceFile ) &&
+							!DeclManager_IsStockMaterialRedeclaration( identifiedType, name, decl->sourceFile, this ) ) {
+						src.Warning( "%s '%s' previously defined at %s:%i",
+							declManagerLocal.GetDeclNameFromType( identifiedType ),
+							name.c_str(),
+							decl->sourceFile ? decl->sourceFile->fileName.c_str() : "*unknown*",
+							decl->sourceLine );
+					}
+					continue;
 				}
-				continue;
+				if ( indexToStoreAt != decl->index ) {
+					common->FatalError( "Packed replay anchor index mismatch: expected %d, got %d",
+						decl->index, indexToStoreAt );
+					return 0;
+				}
+				// Keep the existing object and validated packed index; the code below replaces its body.
+				referencedThisLevel = decl->referencedThisLevel;
 			}
 		} else {
 			decl = declManagerLocal.FindTypeWithoutParsing( identifiedType, name, true, indexToStoreAt );
@@ -1298,6 +1349,9 @@ int idDeclFile::LoadAndParse( idFile *file ) {
 			decl->sourceTextLength = sourceTextLength;
 			decl->sourceLine = sourceLine;
 		}
+		if ( referencedThisLevel ) {
+			decl->ParseLocal();
+		}
 	}
 
 	for ( idDeclLocal *decl = decls; decl; decl = decl->nextInFile ) {
