[BUGFIX] Set correct workspace ID when updating referenceIndex for files