diff --git a/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js b/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js index f8f17ced4c..3095d11ce7 100644 --- a/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js +++ b/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js @@ -117,7 +117,7 @@ ve.dm.MWTransclusionModel.prototype.process = function ( queue ) { existing = ve.indexOf( item.add, this.parts ); if ( existing !== -1 ) { this.removePart( item.add ); - if ( index && index > existing ) { + if ( index && existing + 1 < index ) { index--; } }