Fixes#13665
This PR fixes the issue by searching only for the first field with the
given name.
I used a Set to iterate over the array of fields only once.
The question remains: What happens if someone wants to search for a
nested field that has the same name as a top-level field?
I think this is a much less likely scenario than the one that happened
to OP in #13665, and in that case the user would probably want to change
the name of the nested field.
If we see this as a problem in the future, we can consider something
like using paths (`tabName.fieldName`).
For review, the example snippet that appears in the issue can be used.