extensions: keep both registry indexes consistent on replacement (#351)