Try to handle self-referential conditions.
Authored by: whebisch 2011-11-02
Parent: [r1186]
Child: [r1188]