`foreach` only loops through keys that exist