When doing an UPDATE and there are two occurrances of the table to update, then use the alias as table name. Example
update alias1 -- NOT the table name! set foo = 'bar' from table_foobar alias1 inner join table_foobar alias2 on alias2.foo = alias1.bar