Safari AppleScript - Can't Filter Tabs of Inactive Windows
This is how AppleScript refers to items from lists. You're not doing anything wrong.

When you say ‘first item’ of a list, you get ‘item 1 of {some list}’, that is literally equivalent to the first item in the list as you'd expect it in other languages.

All 3 of these are equivalent and refer to exactly the same thing, even though they show differently.

tab 1 of window id 1




item 1 of {tab 1 of window id 1}




item 1 of {tab 1 of window id 1, tab 2 of …, …}


You can get properties from this item as if it had never been in a list.


set targetName to name of targetTab -- gets the name of the tab


It may be confusing coming from other languages to see the entire list shown when you just want a single item, but it's likely for performance, since it doesn't attempt to extract anything from the list or even show a different representation of the item just because you don't want to see the rest of the list in some sort of output.