When I have something like this in a SQL window, the second statement will think that the 'r' comes from the first statement, and will suggest columns from that instead of from the second statement.
PL/SQL Developer
Version 9.0.6.1665
Windows 7 (64-bit) 6.1 Build 7601 (Service Pack 1)
Code:
begin
for r in (select 'x' as wrong from dual) loop
null;
end loop;
end;
/
select r.*
from all_users r
where r.<code completion shows just 'wrong'..>
PL/SQL Developer
Version 9.0.6.1665
Windows 7 (64-bit) 6.1 Build 7601 (Service Pack 1)