First off, bear in mind that when you build a new table, the variable you assign it to doesn't end up holding "the table", it ends up holding a pointer - like a shortcut, or alias - that leads to the table. I suspect you're already aware of this, but it's worth bearing in mind.
Anyway, when you do:
t={teste}
... what is teste? The answer to that is "whatever it was when your script last
ended". The reason that value's hanging around in memory is because you didn't define it as being local to the script, and so it went into the global space, which persists until the computer reboots.
Read up on scope here.
When you change teste to point to a new table on your second line:
teste={1,2,3}
... that doesn't change which table t[1] points to; it continues to hold a pointer to the table teste pointed to
when that first line executed, that being whatever teste was set to
at that time.
So: reverse the order of those first two lines.