fix index mapping getting cleared on rebuild