Better detection of types depending on local variables.
Authored by: whebisch 2011-08-03
Parent: [r1122]
Child: [r1124]