Using LINQ within a foreach only runs once

I’m trying to reload the player’s items back into their inventory when they load the game. “itemStrings” below is a list of strings of all the item names from when the player saved the game. Here’s the code:

void Load(){
List<string> itemStrings = SaveLoad.Load<List<string>>("Inventory");
            
            foreach(string nameString in itemStrings)
            {
                loadReference = itemDatabase.itemsDatabaseList.Where(obj => obj.name == nameString).First();
                bool wasAdded = instance.Add(loadReference);
		}
}

For reference, itemDatabase is a reference to an ItemDatabase class that stores every item in the game. loadreference is an Item class that’s declared at the beginning of this Inventory class.

What I’m trying to do is search the database for an item whose name matches the string from itemStrings, then take that item and add it to the player’s inventory. This ‘foreach’ works correctly for the first item in the list of itemStrings, but it only runs that one time. So it only loads one item into the inventory, no matter how many were saved previously.

An error in another script was causing the loop to stop running, I’m an idiot.