Changed behaviour for looking up symbols in inherited programs. The latest symbol from the inherit with the least depth is now returned. Fixes [bug 2581 (#2581)]. Rev: src/program.c:1.408