[Lua] Indexing ui content by name does not work when content is an element

Mads Buvik Sandvei
2026-04-03T20:37:24Z

## Issue Description

Indexing ui content by name does not work when content is an element made with ui.create.

If this is intentional, it should be documented.

## Steps to Reproduce
This script reproduces the issue. The last line fails, due to unexpected content key.
```lua
local ui = require('openmw.ui')
local content = ui.content{
{
name = 'name 1'
},
ui.create{
name = 'name 2'
}
}

print(tostring(content[1].name))
print(tostring(content['name 1'].name))
print(tostring(content[2].layout.name))
print(tostring(content['name 2'].layout.name))
```