Partial fix for const correctness issue in LookupPath (but there is still an ugly const_cast!).
Authored by: debug 2009-07-22
Parent: [r5513]
Child: [r5515]