Oh, I see - thanks for the clarification, so I understood correctly.
The rationale behind the existing feature is to allow for "unknown" table aliases to be applied (e.g. when using derived tables) and to still use the generated column literals to extract values for columns of such tables. Example:
SELECT t.x, t.y
FROM (
SELECT some_table.x, some_table.y
FROM ...
) t
In the above example, you don't need to construct a formal t.x or t.y column expression to extract x or y values from the result. You can continue using SOME_TABLE.A generated literals. The algorithm works such that exact matches (table AND column names match) are preferred to "approximate" matches (only column names match).
As a side-effect, duplicate column names may produce unexpected behaviour as you have observed.
This issue has surfaced the user group on numerous occasions. It is actually not trivial to find the exact set of rules when exceptions should be thrown as ambiguous column names in top-level SELECTs are a tricky thing in SQL already. For instance, they're not allowed in nested selects... I'm very open to concrete suggestions for a set of rules, though
Cheers
Lukas